Symfony: Short way in getting all users in widget
$this->setWidgets(
array('sf_guard_user_id' => new sfWidgetFormDoctrineChoice(array('model' => 'sfGuardUser', 'add_empty' => true)))
);
$this->setValidators(
array('sf_guard_user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => 'sfGuardUser', 'column' => 'id')))
);
Here we set the key as model with a value of sfGuardUser, it will return the list of all users
blog comments powered by Disqus-
developed6ok liked this
-
nerdycat posted this