Skip to content

Instantly share code, notes, and snippets.

@dmclark
Created February 24, 2011 17:11
Show Gist options
  • Save dmclark/842467 to your computer and use it in GitHub Desktop.
Save dmclark/842467 to your computer and use it in GitHub Desktop.
public function configure()
{
parent::configure();
$this->setWidgets(array(
'id' => new sfWidgetFormInputHidden(),
'center_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Center'), 'add_empty' => false)),
'sf_guard_user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('sfGuardUser'), 'add_empty' => false)),
'role' => new sfWidgetFormInputText(),
'first_name' => new sfWidgetFormInputText(),
'last_name' => new sfWidgetFormInputText(),
'sfGuardUser_email_address' => new sfWidgetFormInputText(),
'sfGuardUser_username' => new sfWidgetFormInputText(),
// 'algorithm' => new sfWidgetFormInputText(),
// 'salt' => new sfWidgetFormInputText(),
'password' => new sfWidgetFormInputText(),
// 'is_active' => new sfWidgetFormInputCheckbox(),
// 'is_super_admin' => new sfWidgetFormInputCheckbox(),
// 'last_login' => new sfWidgetFormDateTime(),
// 'created_at' => new sfWidgetFormDateTime(),
// 'updated_at' => new sfWidgetFormDateTime(),
'groups_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardGroup')),
'permissions_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardPermission')),
));
$this->useFields(array('center_id', 'first_name', 'last_name' , 'sfGuardUser_email_address', 'sfGuardUser_username'));
// $this->embedRelation('sfGuardUser');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment