本文整理汇总了PHP中BaseFormFilterDoctrine类的典型用法代码示例。如果您正苦于以下问题:PHP BaseFormFilterDoctrine类的具体用法?PHP BaseFormFilterDoctrine怎么用?PHP BaseFormFilterDoctrine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseFormFilterDoctrine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setup
public function setup()
{
$this->setWidgets(array(
'usermodule' => new sfWidgetFormFilterInput(),
'usergroup' => new sfWidgetFormFilterInput(),
'userright' => new sfWidgetFormFilterInput(),
'usermoduleposition' => new sfWidgetFormFilterInput(),
'usergroupposition' => new sfWidgetFormFilterInput(),
'roles_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'Role')),
));
$this->setValidators(array(
'usermodule' => new sfValidatorPass(array('required' => false)),
'usergroup' => new sfValidatorPass(array('required' => false)),
'userright' => new sfValidatorPass(array('required' => false)),
'usermoduleposition' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'usergroupposition' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'roles_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'Role', 'required' => false)),
));
$this->widgetSchema->setNameFormat('credential_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例2: setup
public function setup()
{
$this->setWidgets(array(
'name' => new sfWidgetFormFilterInput(),
'description' => new sfWidgetFormFilterInput(),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'groups_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardGroup')),
'users_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardUser')),
));
$this->setValidators(array(
'name' => new sfValidatorPass(array('required' => false)),
'description' => new sfValidatorPass(array('required' => false)),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'groups_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardGroup', 'required' => false)),
'users_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardUser', 'required' => false)),
));
$this->widgetSchema->setNameFormat('sf_guard_permission_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例3: setup
public function setup()
{
$this->setWidgets(array(
'date_debut_rdv' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
'date_fin_rdv' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
'id_avocat' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Utilisateur'), 'add_empty' => true)),
'id_vente' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Vente'), 'add_empty' => true)),
'commentaire_avocat' => new sfWidgetFormFilterInput(),
));
$this->setValidators(array(
'date_debut_rdv' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'date_fin_rdv' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'id_avocat' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Utilisateur'), 'column' => 'id_utilisateur')),
'id_vente' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Vente'), 'column' => 'id_vente')),
'commentaire_avocat' => new sfValidatorPass(array('required' => false)),
));
$this->widgetSchema->setNameFormat('rdv_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例4: setup
public function setup()
{
$this->setWidgets(array(
'message' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'lock_id' => new sfWidgetFormFilterInput(),
'locked_until' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
'priority' => new sfWidgetFormFilterInput(),
'sent_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
'schedule_time' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
'type' => new sfWidgetFormChoice(array('choices' => array('' => '', 'transactional' => 'transactional', 'campaign' => 'campaign'))),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'message' => new sfValidatorPass(array('required' => false)),
'lock_id' => new sfValidatorPass(array('required' => false)),
'locked_until' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'priority' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'sent_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'schedule_time' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'type' => new sfValidatorChoice(array('required' => false, 'choices' => array('transactional' => 'transactional', 'campaign' => 'campaign'))),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('mail_message_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例5: setup
public function setup()
{
$this->setWidgets(array(
'nombre' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'descripcion' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'proyecto_id' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'nombre' => new sfValidatorPass(array('required' => false)),
'descripcion' => new sfValidatorPass(array('required' => false)),
'proyecto_id' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('linea_base_version_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例6: setup
public function setup()
{
$this->setWidgets(array(
'year' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'make' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'model' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'color_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Color'), 'add_empty' => true)),
'mpg' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'seats' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => true)),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'year' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'make' => new sfValidatorPass(array('required' => false)),
'model' => new sfValidatorPass(array('required' => false)),
'color_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Color'), 'column' => 'id')),
'mpg' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'seats' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('User'), 'column' => 'id')),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('showmobile_vehicle_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例7: setup
public function setup()
{
$this->setWidgets(array(
'name' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'iso_code2' => new sfWidgetFormFilterInput(),
'iso_code3' => new sfWidgetFormFilterInput(),
'address_format_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('ShowmobileAddressFormat'), 'add_empty' => true)),
'flag' => new sfWidgetFormFilterInput(),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'name' => new sfValidatorPass(array('required' => false)),
'iso_code2' => new sfValidatorPass(array('required' => false)),
'iso_code3' => new sfValidatorPass(array('required' => false)),
'address_format_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('ShowmobileAddressFormat'), 'column' => 'id')),
'flag' => new sfValidatorPass(array('required' => false)),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('showmobile_country_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例8: setup
public function setup()
{
if ($this->needsWidget('id')) {
$this->setWidget('id', new sfWidgetFormDmFilterInput());
$this->setValidator('id', new sfValidatorDoctrineChoice(array('required' => false, 'model' => 'DmZone', 'column' => 'id')));
}
if ($this->needsWidget('css_class')) {
$this->setWidget('css_class', new sfWidgetFormDmFilterInput());
$this->setValidator('css_class', new sfValidatorSchemaFilter('text', new sfValidatorString(array('required' => false))));
}
if ($this->needsWidget('width')) {
$this->setWidget('width', new sfWidgetFormDmFilterInput());
$this->setValidator('width', new sfValidatorSchemaFilter('text', new sfValidatorString(array('required' => false))));
}
if ($this->needsWidget('position')) {
$this->setWidget('position', new sfWidgetFormDmFilterInput());
$this->setValidator('position', new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))));
}
if ($this->needsWidget('widgets_list')) {
$this->setWidget('widgets_list', new sfWidgetFormDmDoctrineChoice(array('multiple' => true, 'model' => 'DmWidget', 'expanded' => true)));
$this->setValidator('widgets_list', new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'DmWidget', 'required' => false)));
}
if ($this->needsWidget('area_list')) {
$this->setWidget('area_list', new sfWidgetFormDoctrineChoice(array('multiple' => false, 'model' => 'DmArea', 'expanded' => false)));
$this->setValidator('area_list', new sfValidatorDoctrineChoice(array('multiple' => false, 'model' => 'DmArea', 'required' => true)));
}
$this->widgetSchema->setNameFormat('dm_zone_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例9: setup
public function setup()
{
$this->setWidgets(array(
'documenttemplatetemplate_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('DocumenttemplateTemplate'), 'add_empty' => true)),
'name' => new sfWidgetFormFilterInput(),
'isactive' => new sfWidgetFormFilterInput(),
'deleted_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'documenttemplatetemplate_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('DocumenttemplateTemplate'), 'column' => 'id')),
'name' => new sfValidatorPass(array('required' => false)),
'isactive' => new sfValidatorPass(array('required' => false)),
'deleted_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('mailinglist_template_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例10: setup
public function setup()
{
$this->setWidgets(array(
'joined_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'membership_type_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('MembershipType'), 'add_empty' => true)),
'person_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Person'), 'add_empty' => true)),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'joined_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
'membership_type_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('MembershipType'), 'column' => 'id')),
'person_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Person'), 'column' => 'id')),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('ds_membership_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例11: setup
public function setup()
{
$this->setWidgets(array(
'class_letter_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('ClassLetter'), 'add_empty' => true)),
'person_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Person'), 'add_empty' => true)),
'enrolment_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Enrolment'), 'add_empty' => true)),
'sent_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'success' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'failed' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'email' => new sfWidgetFormFilterInput(),
'body' => new sfWidgetFormFilterInput(),
));
$this->setValidators(array(
'class_letter_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('ClassLetter'), 'column' => 'id')),
'person_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Person'), 'column' => 'id')),
'enrolment_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Enrolment'), 'column' => 'id')),
'sent_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'success' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'failed' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'email' => new sfValidatorPass(array('required' => false)),
'body' => new sfValidatorPass(array('required' => false)),
));
$this->widgetSchema->setNameFormat('ds_class_letter_recipient_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例12: setup
public function setup()
{
$this->setWidgets(array(
'patient_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'), 'add_empty' => true)),
'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser'), 'add_empty' => true)),
'prev_user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser_3'), 'add_empty' => true)),
'active' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'denied' => new sfWidgetFormFilterInput(),
));
$this->setValidators(array(
'patient_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('AdPatient'), 'column' => 'patient_id')),
'user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('AdUser'), 'column' => 'user_id')),
'prev_user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('AdUser_3'), 'column' => 'user_id')),
'active' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'denied' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
));
$this->widgetSchema->setNameFormat('ad_user_patient_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例13: setup
public function setup()
{
$this->setWidgets(array(
'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => true)),
'email_new' => new sfWidgetFormFilterInput(),
'firstname' => new sfWidgetFormFilterInput(),
'lastname' => new sfWidgetFormFilterInput(),
'validate_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
'validate' => new sfWidgetFormFilterInput(),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'user_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('User'), 'column' => 'id')),
'email_new' => new sfValidatorPass(array('required' => false)),
'firstname' => new sfValidatorPass(array('required' => false)),
'lastname' => new sfValidatorPass(array('required' => false)),
'validate_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'validate' => new sfValidatorPass(array('required' => false)),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('sf_guard_user_profile_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例14: setup
public function setup()
{
$this->setWidgets(array(
'first_name' => new sfWidgetFormFilterInput(),
'last_name' => new sfWidgetFormFilterInput(),
'address' => new sfWidgetFormFilterInput(),
'latitude' => new sfWidgetFormFilterInput(),
'longitude' => new sfWidgetFormFilterInput(),
));
$this->setValidators(array(
'first_name' => new sfValidatorPass(array('required' => false)),
'last_name' => new sfValidatorPass(array('required' => false)),
'address' => new sfValidatorPass(array('required' => false)),
'latitude' => new sfValidatorPass(array('required' => false)),
'longitude' => new sfValidatorPass(array('required' => false)),
));
$this->widgetSchema->setNameFormat('user_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
示例15: setup
public function setup()
{
if ($this->needsWidget('id')) {
$this->setWidget('id', new sfWidgetFormDmFilterInput());
$this->setValidator('id', new sfValidatorDoctrineChoice(array('required' => false, 'model' => 'DmCatalogue', 'column' => 'id')));
}
if ($this->needsWidget('name')) {
$this->setWidget('name', new sfWidgetFormDmFilterInput());
$this->setValidator('name', new sfValidatorSchemaFilter('text', new sfValidatorString(array('required' => false))));
}
if ($this->needsWidget('source_lang')) {
$this->setWidget('source_lang', new sfWidgetFormDmFilterInput());
$this->setValidator('source_lang', new sfValidatorSchemaFilter('text', new sfValidatorString(array('required' => false))));
}
if ($this->needsWidget('target_lang')) {
$this->setWidget('target_lang', new sfWidgetFormDmFilterInput());
$this->setValidator('target_lang', new sfValidatorSchemaFilter('text', new sfValidatorString(array('required' => false))));
}
if ($this->needsWidget('units_list')) {
$this->setWidget('units_list', new sfWidgetFormDmDoctrineChoice(array('multiple' => true, 'model' => 'DmTransUnit', 'expanded' => true)));
$this->setValidator('units_list', new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'DmTransUnit', 'required' => false)));
}
$this->widgetSchema->setNameFormat('dm_catalogue_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}