public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'documenttemplatetemplate_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('DocumenttemplateTemplate'), 'add_empty' => true)), 'name' => new sfWidgetFormInputText(), 'isactive' => new sfWidgetFormInputText(), 'deleted_at' => new sfWidgetFormDateTime(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'documenttemplatetemplate_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('DocumenttemplateTemplate'), 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'isactive' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'deleted_at' => new sfValidatorDateTime(array('required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('mailinglist_template[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInputText(), 'is_primary' => new sfWidgetFormInputCheckbox(), 'city' => new sfWidgetFormInputText(), 'state' => new sfWidgetFormInputText(), 'zip' => new sfWidgetFormInputText(), 'contact_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Contact'), 'add_empty' => false)), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'is_primary' => new sfValidatorBoolean(array('required' => false)), 'city' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'state' => new sfValidatorString(array('max_length' => 25, 'required' => false)), 'zip' => new sfValidatorString(array('max_length' => 25, 'required' => false)), 'contact_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Contact'))), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('contact_address[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'mailinglistversion_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('MailinglistVersion'), 'add_empty' => true)), 'type' => new sfWidgetFormInputText(), 'deleteworkflow' => new sfWidgetFormInputText(), 'archiveworkflow' => new sfWidgetFormInputText(), 'stopneworkflow' => new sfWidgetFormInputText(), 'detailsworkflow' => new sfWidgetFormInputText(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'mailinglistversion_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('MailinglistVersion'), 'required' => false)), 'type' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'deleteworkflow' => new sfValidatorInteger(array('required' => false)), 'archiveworkflow' => new sfValidatorInteger(array('required' => false)), 'stopneworkflow' => new sfValidatorInteger(array('required' => false)), 'detailsworkflow' => new sfValidatorInteger(array('required' => false)), )); $this->widgetSchema->setNameFormat('mailinglist_authorization_setting[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'reason' => new sfWidgetFormTextarea(), 'referer' => new sfWidgetFormInputText(), 'state' => new sfWidgetFormChoice(array('choices' => array('valid' => 'valid', 'invalid' => 'invalid', 'untreated' => 'untreated'))), 'id_comment' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Comment'), 'add_empty' => false)), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'reason' => new sfValidatorString(), 'referer' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'state' => new sfValidatorChoice(array('choices' => array(0 => 'valid', 1 => 'invalid', 2 => 'untreated'), 'required' => false)), 'id_comment' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Comment'))), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('comment_report[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'joined_at' => new sfWidgetFormDate(), 'membership_type_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('MembershipType'), 'add_empty' => false)), 'person_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Profile'), 'add_empty' => false)), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'joined_at' => new sfValidatorDate(), 'membership_type_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('MembershipType'))), 'person_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Profile'))), )); $this->validatorSchema->setPostValidator( new sfValidatorDoctrineUnique(array('model' => 'dsMember', 'column' => array('person_id'))) ); $this->widgetSchema->setNameFormat('ds_member[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'workflowslotfield_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('WorkflowSlotField'), 'add_empty' => true)), 'fieldcheckboxgroup_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('FieldCheckboxgroup'), 'add_empty' => true)), 'value' => new sfWidgetFormInputText(), 'position' => new sfWidgetFormInputText(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'workflowslotfield_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('WorkflowSlotField'), 'required' => false)), 'fieldcheckboxgroup_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('FieldCheckboxgroup'), 'required' => false)), 'value' => new sfValidatorInteger(array('required' => false)), 'position' => new sfValidatorInteger(array('required' => false)), )); $this->widgetSchema->setNameFormat('workflow_slot_field_checkboxgroup[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => false)), 'driver_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Driver'), 'add_empty' => false)), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'user_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('User'))), 'driver_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Driver'))), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('showmobile_passenger[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInputText(), 'address' => new sfWidgetFormInputText(), 'gender' => new sfWidgetFormChoice(array('choices' => array('Male' => 'Male', 'Female' => 'Female'))), 'birthday' => new sfWidgetFormDate(), 'company_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Company'), 'add_empty' => true)), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'address' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'gender' => new sfValidatorChoice(array('choices' => array(0 => 'Male', 1 => 'Female'), 'required' => false)), 'birthday' => new sfValidatorDate(array('required' => false)), 'company_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Company'), 'required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('contact[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'country_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Country'), 'add_empty' => false)), 'code' => new sfWidgetFormInputText(), 'name' => new sfWidgetFormInputText(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'country_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Country'))), 'code' => new sfValidatorString(array('max_length' => 32, 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 64)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('showmobile_zone[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'documenttemplateversion_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('DocumenttemplateVersion'), 'add_empty' => true)), 'name' => new sfWidgetFormInputText(), 'sendtoallreceivers' => new sfWidgetFormInputText(), 'position' => new sfWidgetFormInputText(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'documenttemplateversion_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('DocumenttemplateVersion'), 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'sendtoallreceivers' => new sfValidatorInteger(array('required' => false)), 'position' => new sfValidatorInteger(array('required' => false)), )); $this->widgetSchema->setNameFormat('documenttemplate_slot[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'nombre' => new sfWidgetFormInputText(), 'file' => new sfWidgetFormInputText(), 'artefactoid' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Artefacto'), 'add_empty' => false)), 'descripcion' => new sfWidgetFormInputText(), 'deleted' => new sfWidgetFormInputCheckbox(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'nombre' => new sfValidatorString(array('max_length' => 100, 'required' => false)), 'file' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'artefactoid' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Artefacto'))), 'descripcion' => new sfValidatorString(array('max_length' => 200, 'required' => false)), 'deleted' => new sfValidatorBoolean(array('required' => false)), )); $this->widgetSchema->setNameFormat('ficheros_art[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'nombre' => new sfWidgetFormInputText(), 'descripcion' => new sfWidgetFormTextarea(), 'proyecto_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Proyecto'), 'add_empty' => false)), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), 'version' => new sfWidgetFormInputText(), 'versiones_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'Version')), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'nombre' => new sfValidatorString(array('max_length' => 255)), 'descripcion' => new sfValidatorString(array('max_length' => 4000)), 'proyecto_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Proyecto'))), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), 'version' => new sfValidatorInteger(array('required' => false)), 'versiones_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'Version', 'required' => false)), )); $this->widgetSchema->setNameFormat('linea_base[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'lesson_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Lesson'), 'add_empty' => false)), 'teacher_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Teacher'), 'add_empty' => false)), 'is_accounted' => new sfWidgetFormInputCheckbox(), 'accounted_at' => new sfWidgetFormDateTime(), 'accounted_by' => new sfWidgetFormInputText(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'lesson_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Lesson'))), 'teacher_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Teacher'))), 'is_accounted' => new sfValidatorBoolean(array('required' => false)), 'accounted_at' => new sfValidatorDateTime(array('required' => false)), 'accounted_by' => new sfValidatorInteger(), )); $this->widgetSchema->setNameFormat('ds_lesson_teacher[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'workflowversion_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('WorkflowVersion'), 'add_empty' => true)), 'slot_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('DocumenttemplateSlot'), 'add_empty' => true)), 'position' => new sfWidgetFormInputText(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'workflowversion_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('WorkflowVersion'), 'required' => false)), 'slot_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('DocumenttemplateSlot'), 'required' => false)), 'position' => new sfValidatorInteger(array('required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('workflow_slot[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInputText(), 'description' => new sfWidgetFormTextarea(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), 'users_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardUser')), 'permissions_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardPermission')), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'description' => new sfValidatorString(array('max_length' => 1000, 'required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), 'users_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardUser', 'required' => false)), 'permissions_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardPermission', 'required' => false)), )); $this->validatorSchema->setPostValidator( new sfValidatorDoctrineUnique(array('model' => 'sfGuardGroup', 'column' => array('name'))) ); $this->widgetSchema->setNameFormat('sf_guard_group[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'notification_id' => new sfWidgetFormInputHidden(), 'prev_user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser_3'), 'add_empty' => false)), 'new_user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser'), 'add_empty' => false)), 'patient_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'), 'add_empty' => false)), 'reason' => new sfWidgetFormTextarea(), 'accepted' => new sfWidgetFormInputText(), 'checked' => new sfWidgetFormInputText(), 'date' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'notification_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('notification_id')), 'empty_value' => $this->getObject()->get('notification_id'), 'required' => false)), 'prev_user_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser_3'))), 'new_user_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser'))), 'patient_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'))), 'reason' => new sfValidatorString(array('required' => false)), 'accepted' => new sfValidatorInteger(array('required' => false)), 'checked' => new sfValidatorInteger(array('required' => false)), 'date' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('ad_notification[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'lesson_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Lesson'), 'add_empty' => false)), 'class_student_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Student'), 'add_empty' => false)), 'will_attend' => new sfWidgetFormInputCheckbox(), 'was_present' => new sfWidgetFormInputCheckbox(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'lesson_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Lesson'))), 'class_student_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Student'))), 'will_attend' => new sfValidatorBoolean(array('required' => false)), 'was_present' => new sfValidatorBoolean(array('required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->validatorSchema->setPostValidator( new sfValidatorDoctrineUnique(array('model' => 'dsLessonStudent', 'column' => array('lesson_id', 'class_student_id'))) ); $this->widgetSchema->setNameFormat('ds_lesson_student[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'title' => new sfWidgetFormInputText(), 'type' => new sfWidgetFormInputText(), 'writeprotected' => new sfWidgetFormInputText(), 'color' => new sfWidgetFormInputText(), 'deleted_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'title' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'type' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'writeprotected' => new sfValidatorInteger(array('required' => false)), 'color' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'deleted_at' => new sfValidatorDateTime(array('required' => false)), )); $this->widgetSchema->setNameFormat('field[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'categ_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Categ'), 'add_empty' => false)), 'user_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Author'), 'add_empty' => false)), 'image_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Image'), 'add_empty' => true)), 'file_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('File'), 'add_empty' => true)), 'date' => new sfWidgetFormDmDate(), 'created_by' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('CreatedBy'), 'add_empty' => true)), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), 'position' => new sfWidgetFormInputText(), 'tags_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'DmTestTag', 'expanded' => true)))); $this->setValidators(array('id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'categ_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Categ'))), 'user_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Author'))), 'image_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Image'), 'required' => false)), 'file_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('File'), 'required' => false)), 'date' => new dmValidatorDate(), 'created_by' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('CreatedBy'), 'required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), 'position' => new sfValidatorInteger(array('required' => false)), 'tags_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'DmTestTag', 'required' => false)))); /* * Embed Media form for image_id */ $this->embedForm('image_id_form', $this->createMediaFormForImageId()); unset($this['image_id']); /* * Embed Media form for file_id */ $this->embedForm('file_id_form', $this->createMediaFormForFileId()); unset($this['file_id']); if ('embed' == sfConfig::get('dm_i18n_form')) { $this->embedI18n(sfConfig::get('dm_i18n_cultures')); } else { $this->mergeI18nForm(); } $this->widgetSchema->setNameFormat('dm_test_post[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); // Unset automatic fields like 'created_at', 'updated_at', 'position' // override this method in your form to keep them parent::unsetAutoFields(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInputText(), 'city' => new sfWidgetFormInputText(), 'state' => new sfWidgetFormInputText(), 'zip' => new sfWidgetFormInputText(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'city' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'state' => new sfValidatorString(array('max_length' => 25, 'required' => false)), 'zip' => new sfValidatorString(array('max_length' => 25, 'required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('company[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'class_letter_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('ClassLetter'), 'add_empty' => false)), 'person_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Person'), 'add_empty' => false)), 'enrolment_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Enrolment'), 'add_empty' => true)), 'sent_at' => new sfWidgetFormDateTime(), 'success' => new sfWidgetFormInputCheckbox(), 'failed' => new sfWidgetFormInputCheckbox(), 'email' => new sfWidgetFormInputText(), 'body' => new sfWidgetFormTextarea(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'class_letter_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('ClassLetter'))), 'person_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Person'))), 'enrolment_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Enrolment'), 'required' => false)), 'sent_at' => new sfValidatorDateTime(), 'success' => new sfValidatorBoolean(array('required' => false)), 'failed' => new sfValidatorBoolean(array('required' => false)), 'email' => new sfValidatorEmail(array('max_length' => 255, 'required' => false)), 'body' => new sfValidatorString(array('required' => false)), )); $this->widgetSchema->setNameFormat('ds_class_letter_recipient[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'address_format' => new sfWidgetFormInputText(), 'address_summary' => new sfWidgetFormInputText(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'address_format' => new sfValidatorString(array('max_length' => 128)), 'address_summary' => new sfValidatorString(array('max_length' => 48, 'required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('showmobile_address_format[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'studio_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Studio'), 'add_empty' => false)), 'weekday' => new sfWidgetFormChoice(array('choices' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7))), 'time' => new sfWidgetFormTime(), 'duration' => new sfWidgetFormInputText(), 'created_at' => new sfWidgetFormDateTime(), 'updated_at' => new sfWidgetFormDateTime(), 'created_by' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Creator'), 'add_empty' => false)), 'updated_by' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Updator'), 'add_empty' => true)), )); $this->setValidators(array( 'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)), 'studio_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Studio'))), 'weekday' => new sfValidatorChoice(array('choices' => array(0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7), 'required' => false)), 'time' => new sfValidatorTime(array('required' => false)), 'duration' => new sfValidatorInteger(array('required' => false)), 'created_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(), 'created_by' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Creator'))), 'updated_by' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Updator'), 'required' => false)), )); $this->widgetSchema->setNameFormat('ds_slot[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'field_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Field'), 'add_empty' => true)), 'value' => new sfWidgetFormInputText(), 'isactive' => new sfWidgetFormInputText(), 'position' => new sfWidgetFormInputText(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)), 'field_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Field'), 'required' => false)), 'value' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'isactive' => new sfValidatorInteger(array('required' => false)), 'position' => new sfValidatorInteger(array('required' => false)), )); $this->widgetSchema->setNameFormat('field_radiogroup[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'non_psycho_pat_id' => new sfWidgetFormInputHidden(), 'ad_patient_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'), 'add_empty' => false)), 'non_psycho_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdNonPsycho'), 'add_empty' => false)), 'start_date' => new sfWidgetFormDateTime(), 'stop_date' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'non_psycho_pat_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('non_psycho_pat_id')), 'empty_value' => $this->getObject()->get('non_psycho_pat_id'), 'required' => false)), 'ad_patient_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'))), 'non_psycho_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdNonPsycho'))), 'start_date' => new sfValidatorDateTime(), 'stop_date' => new sfValidatorDateTime(array('required' => false)), )); $this->widgetSchema->setNameFormat('ad_non_psycho_pat[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'med_base_id' => new sfWidgetFormInputHidden(), 'mainclass' => new sfWidgetFormInputText(), 'gen_name' => new sfWidgetFormInputText(), 'speciality' => new sfWidgetFormInputText(), 'med_type_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('MedType'), 'add_empty' => false)), )); $this->setValidators(array( 'med_base_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('med_base_id')), 'empty_value' => $this->getObject()->get('med_base_id'), 'required' => false)), 'mainclass' => new sfValidatorString(array('max_length' => 45)), 'gen_name' => new sfValidatorString(array('max_length' => 45)), 'speciality' => new sfValidatorString(array('max_length' => 45)), 'med_type_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('MedType'))), )); $this->widgetSchema->setNameFormat('med_base_id[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'description' => new sfWidgetFormInputText(), 'group_by' => new sfWidgetFormInputText(), 'deleteable' => new sfWidgetFormInputText(), 'editable' => new sfWidgetFormInputText(), 'user_rights_list' => new sfWidgetFormDoctrineChoiceMany(array('model' => 'UserRight')), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => 'UserRole', 'column' => 'id', 'required' => false)), 'description' => new sfValidatorString(array('max_length' => 100, 'required' => false)), 'group_by' => new sfValidatorString(array('max_length' => 100, 'required' => false)), 'deleteable' => new sfValidatorInteger(array('required' => false)), 'editable' => new sfValidatorInteger(array('required' => false)), 'user_rights_list' => new sfValidatorDoctrineChoiceMany(array('model' => 'UserRight', 'required' => false)), )); $this->widgetSchema->setNameFormat('user_role[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); parent::setup(); }
public function setup() { parent::setup(); //column if ($this->needsWidget('name')) { $this->setWidget('name', new sfWidgetFormInputText()); $this->setValidator('name', new sfValidatorString(array('max_length' => 255))); } //column if ($this->needsWidget('slug')) { $this->setWidget('slug', new sfWidgetFormInputText()); $this->setValidator('slug', new sfValidatorString(array('max_length' => 255))); } //column if ($this->needsWidget('lang')) { $this->setWidget('lang', new sfWidgetFormInputHidden()); $this->setValidator('lang', new sfValidatorChoice(array('choices' => array($this->getObject()->get('lang')), 'empty_value' => $this->getObject()->get('lang'), 'required' => false))); } //one to one if ($this->needsWidget('id')) { $this->setWidget('id', new sfWidgetFormDmDoctrineChoice(array('multiple' => false, 'model' => 'DmTestTag', 'expanded' => false))); $this->setValidator('id', new sfValidatorDoctrineChoice(array('multiple' => false, 'model' => 'DmTestTag', 'required' => false))); } $this->validatorSchema->setPostValidator(new sfValidatorDoctrineUnique(array('model' => 'DmTestTagTranslation', 'column' => array('slug')))); $this->widgetSchema->setNameFormat('dm_test_tag_translation[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); // Unset automatic fields like 'created_at', 'updated_at', 'position' // override this method in your form to keep them parent::unsetAutoFields(); }
public function setup() { $this->setWidgets(array( 'id_traitement_agent' => new sfWidgetFormInputHidden(), 'commentaire_agent' => new sfWidgetFormInputText(), 'id_qualif_agent' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('QualificationAgent'), 'add_empty' => true)), 'id_question' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Question'), 'add_empty' => false)), 'id_agent' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Utilisateur'), 'add_empty' => true)), 'priorite' => new sfWidgetFormInputText(), 'date_creation' => new sfWidgetFormDateTime(), 'date_modification' => new sfWidgetFormDateTime(), )); $this->setValidators(array( 'id_traitement_agent' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_traitement_agent')), 'empty_value' => $this->getObject()->get('id_traitement_agent'), 'required' => false)), 'commentaire_agent' => new sfValidatorString(array('max_length' => 45, 'required' => false)), 'id_qualif_agent' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('QualificationAgent'), 'required' => false)), 'id_question' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Question'))), 'id_agent' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Utilisateur'), 'required' => false)), 'priorite' => new sfValidatorInteger(array('required' => false)), 'date_creation' => new sfValidatorDateTime(), 'date_modification' => new sfValidatorDateTime(), )); $this->widgetSchema->setNameFormat('traitement_agent[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }
public function setup() { $this->setWidgets(array( 'id_utilisateur' => new sfWidgetFormInputHidden(), 'nom' => new sfWidgetFormInputText(), 'prenom' => new sfWidgetFormInputText(), 'login' => new sfWidgetFormInputText(), 'password' => new sfWidgetFormInputText(), 'type' => new sfWidgetFormInputText(), )); $this->setValidators(array( 'id_utilisateur' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_utilisateur')), 'empty_value' => $this->getObject()->get('id_utilisateur'), 'required' => false)), 'nom' => new sfValidatorString(array('max_length' => 45, 'required' => false)), 'prenom' => new sfValidatorString(array('max_length' => 45, 'required' => false)), 'login' => new sfValidatorString(array('max_length' => 45, 'required' => false)), 'password' => new sfValidatorString(array('max_length' => 45, 'required' => false)), 'type' => new sfValidatorInteger(array('required' => false)), )); $this->widgetSchema->setNameFormat('utilisateur[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->setupInheritance(); parent::setup(); }