in the tutorial i can use either:
public function configure() {
$this->setWidgets(array(
'type' => new sfWidgetFormChoice(array(
'choices' => Doctrine_Core::getTable('Gender')->getTypesForForm(),
'expanded' => false,
'multiple' => false,
))
));
$this->widgetSchema['type'] = new sfWidgetFormChoice(array(
'choices' => Doctrine_Core::getTable('Gender')->getTypesForForm(),
'expanded' => false,
'multiple' => false,
));
}
to define a widget.
i wonder which i should use and why there is 2 ways of writing this?
thanks