本文整理汇总了PHP中BaseFormPropel::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseFormPropel::setup方法的具体用法?PHP BaseFormPropel::setup怎么用?PHP BaseFormPropel::setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseFormPropel
的用法示例。
在下文中一共展示了BaseFormPropel::setup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'fk_establecimiento_id' => new sfWidgetFormPropelChoice(array('model' => 'Establecimiento', 'add_empty' => false)), 'fecha_inicio' => new sfWidgetFormDateTime(), 'fecha_fin' => new sfWidgetFormDateTime(), 'descripcion' => new sfWidgetFormInput(), 'actual' => new sfWidgetFormInputCheckbox()));
$this->setValidators(array('id' => new sfValidatorPropelChoice(array('model' => 'Ciclolectivo', 'column' => 'id', 'required' => false)), 'fk_establecimiento_id' => new sfValidatorPropelChoice(array('model' => 'Establecimiento', 'column' => 'id')), 'fecha_inicio' => new sfValidatorDateTime(), 'fecha_fin' => new sfValidatorDateTime(), 'descripcion' => new sfValidatorString(array('max_length' => 255)), 'actual' => new sfValidatorBoolean()));
$this->widgetSchema->setNameFormat('ciclolectivo[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例2: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'meta_id' => new sfWidgetFormPropelChoice(array('model' => 'Meta', 'add_empty' => true)), 'name' => new sfWidgetFormInput(), 'is_active' => new sfWidgetFormInputCheckbox(), 'created_at' => new sfWidgetFormDateTime()));
$this->setValidators(array('id' => new sfValidatorPropelChoice(array('model' => 'Authors', 'column' => 'id', 'required' => false)), 'meta_id' => new sfValidatorPropelChoice(array('model' => 'Meta', 'column' => 'id', 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255)), 'is_active' => new sfValidatorBoolean(), 'created_at' => new sfValidatorDateTime(array('required' => false))));
$this->widgetSchema->setNameFormat('authors[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例3: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'role_id' => new sfWidgetFormPropelChoice(array('model' => 'Role', 'add_empty' => true)), 'employee_id' => new sfWidgetFormPropelChoice(array('model' => 'Employee', 'add_empty' => true)), 'user' => new sfWidgetFormInput(), 'password' => new sfWidgetFormInput(), 'status' => new sfWidgetFormInput(), 'created_at' => new sfWidgetFormDate(), 'updated_at' => new sfWidgetFormDate()));
$this->setValidators(array('id' => new sfValidatorPropelChoice(array('model' => 'User', 'column' => 'id', 'required' => false)), 'role_id' => new sfValidatorPropelChoice(array('model' => 'Role', 'column' => 'id', 'required' => false)), 'employee_id' => new sfValidatorPropelChoice(array('model' => 'Employee', 'column' => 'id', 'required' => false)), 'user' => new sfValidatorString(array('max_length' => 50, 'required' => false)), 'password' => new sfValidatorString(array('max_length' => 50, 'required' => false)), 'status' => new sfValidatorString(array('max_length' => 10, 'required' => false)), 'created_at' => new sfValidatorDate(array('required' => false)), 'updated_at' => new sfValidatorDate(array('required' => false))));
$this->widgetSchema->setNameFormat('user[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例4: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInputText()));
$this->setValidators(array('id' => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 45, 'required' => false))));
$this->widgetSchema->setNameFormat('primary_attribute[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例5: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInput()));
$this->setValidators(array('id' => new sfValidatorPropelChoice(array('model' => 'Status', 'column' => 'id', 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false))));
$this->widgetSchema->setNameFormat('status[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例6: setup
public function setup()
{
$this->setWidgets(array('group_id' => new sfWidgetFormInputHidden(), 'permission_id' => new sfWidgetFormInputHidden()));
$this->setValidators(array('group_id' => new sfValidatorPropelChoice(array('model' => 'sfGuardGroup', 'column' => 'id', 'required' => false)), 'permission_id' => new sfValidatorPropelChoice(array('model' => 'sfGuardPermission', 'column' => 'id', 'required' => false))));
$this->widgetSchema->setNameFormat('sf_guard_group_permission[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例7: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'culture' => new sfWidgetFormInputHidden(), 'title' => new sfWidgetFormInput()));
$this->setValidators(array('id' => new sfValidatorPropelChoice(array('model' => 'Movie', 'column' => 'id', 'required' => false)), 'culture' => new sfValidatorPropelChoice(array('model' => 'MovieI18n', 'column' => 'culture', 'required' => false)), 'title' => new sfValidatorString(array('required' => false))));
$this->widgetSchema->setNameFormat('movie_i18n[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例8: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'article_id' => new sfWidgetFormPropelChoice(array('model' => 'Article', 'add_empty' => true)), 'name' => new sfWidgetFormInputText(), 'file' => new sfWidgetFormInputText()));
$this->setValidators(array('id' => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)), 'article_id' => new sfValidatorPropelChoice(array('model' => 'Article', 'column' => 'id', 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)), 'file' => new sfValidatorString(array('max_length' => 255, 'required' => false))));
$this->widgetSchema->setNameFormat('attachment[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例9: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'tests_id' => new sfWidgetFormPropelChoice(array('model' => 'Tests', 'add_empty' => false)), 'nombre' => new sfWidgetFormInputText(), 'nombreLargo' => new sfWidgetFormInputText(), 'descripcion' => new sfWidgetFormTextarea()));
$this->setValidators(array('id' => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)), 'tests_id' => new sfValidatorPropelChoice(array('model' => 'Tests', 'column' => 'id')), 'nombre' => new sfValidatorString(array('max_length' => 50, 'required' => false)), 'nombreLargo' => new sfValidatorString(array('max_length' => 150, 'required' => false)), 'descripcion' => new sfValidatorString(array('required' => false))));
$this->widgetSchema->setNameFormat('escalas[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例10: setup
public function setup()
{
$this->setWidgets(array('idLlista' => new sfWidgetFormInputHidden(), 'idEmail' => new sfWidgetFormInputHidden(), 'alta' => new sfWidgetFormDate(), 'baixa' => new sfWidgetFormDate(), 'actiu' => new sfWidgetFormInputText(), 'site_id' => new sfWidgetFormInputText()));
$this->setValidators(array('idLlista' => new sfValidatorChoice(array('choices' => array($this->getObject()->getIdllista()), 'empty_value' => $this->getObject()->getIdllista(), 'required' => false)), 'idEmail' => new sfValidatorChoice(array('choices' => array($this->getObject()->getIdemail()), 'empty_value' => $this->getObject()->getIdemail(), 'required' => false)), 'alta' => new sfValidatorDate(array('required' => false)), 'baixa' => new sfValidatorDate(array('required' => false)), 'actiu' => new sfValidatorInteger(array('min' => -128, 'max' => 127)), 'site_id' => new sfValidatorInteger(array('min' => -128, 'max' => 127))));
$this->widgetSchema->setNameFormat('llistes_llistes_emails[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例11: setup
public function setup()
{
$this->setWidgets(array('idEspaiextern' => new sfWidgetFormInputHidden(), 'Poble' => new sfWidgetFormPropelChoice(array('model' => 'Poblacions', 'add_empty' => false)), 'Nom' => new sfWidgetFormTextarea(), 'Adreca' => new sfWidgetFormTextarea(), 'Contacte' => new sfWidgetFormTextarea(), 'actiu' => new sfWidgetFormInputText()));
$this->setValidators(array('idEspaiextern' => new sfValidatorChoice(array('choices' => array($this->getObject()->getIdespaiextern()), 'empty_value' => $this->getObject()->getIdespaiextern(), 'required' => false)), 'Poble' => new sfValidatorPropelChoice(array('model' => 'Poblacions', 'column' => 'idPoblacio')), 'Nom' => new sfValidatorString(), 'Adreca' => new sfValidatorString(), 'Contacte' => new sfValidatorString(), 'actiu' => new sfValidatorInteger(array('min' => -128, 'max' => 127))));
$this->widgetSchema->setNameFormat('espais_externs[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例12: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'county' => new sfWidgetFormInputText(), 'city' => new sfWidgetFormInputText(), 'village' => new sfWidgetFormInputText(), 'VoteNo' => new sfWidgetFormInputText(), 'DPPNum' => new sfWidgetFormInputText(), 'DPPRatio' => new sfWidgetFormInputText(), 'KMTNum' => new sfWidgetFormInputText(), 'KMTRatio' => new sfWidgetFormInputText(), 'vaildVotes' => new sfWidgetFormInputText(), 'invaildVotes' => new sfWidgetFormInputText(), 'totalVotes' => new sfWidgetFormInputText(), 'otherVotes' => new sfWidgetFormInputText(), 'VotersNum' => new sfWidgetFormInputText(), 'VotersRatio' => new sfWidgetFormInputText()));
$this->setValidators(array('id' => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)), 'county' => new sfValidatorString(array('required' => false)), 'city' => new sfValidatorString(array('required' => false)), 'village' => new sfValidatorString(array('required' => false)), 'VoteNo' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'DPPNum' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'DPPRatio' => new sfValidatorNumber(array('required' => false)), 'KMTNum' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'KMTRatio' => new sfValidatorNumber(array('required' => false)), 'vaildVotes' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'invaildVotes' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'totalVotes' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'otherVotes' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'VotersNum' => new sfValidatorInteger(array('min' => -2147483648.0, 'max' => 2147483647, 'required' => false)), 'VotersRatio' => new sfValidatorNumber(array('required' => false))));
$this->widgetSchema->setNameFormat('presidentialelection2004[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例13: setup
public function setup()
{
$this->setWidgets(array('id' => new sfWidgetFormInputHidden(), 'post_id' => new sfWidgetFormPropelChoice(array('model' => 'VdmlPost', 'add_empty' => false)), 'content' => new sfWidgetFormTextarea(), 'author' => new sfWidgetFormInputText(), 'is_published' => new sfWidgetFormInputCheckbox(), 'updated_at' => new sfWidgetFormDateTime()));
$this->setValidators(array('id' => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)), 'post_id' => new sfValidatorPropelChoice(array('model' => 'VdmlPost', 'column' => 'id')), 'content' => new sfValidatorString(), 'author' => new sfValidatorString(array('max_length' => 50, 'required' => false)), 'is_published' => new sfValidatorBoolean(array('required' => false)), 'updated_at' => new sfValidatorDateTime(array('required' => false))));
$this->widgetSchema->setNameFormat('vdml_comment[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例14: setup
public function setup()
{
$this->setWidgets(array('title' => new sfWidgetFormInput(), 'keywords' => new sfWidgetFormInput(), 'description' => new sfWidgetFormTextarea(), 'is_active' => new sfWidgetFormInputCheckbox(), 'created_at' => new sfWidgetFormDateTime(), 'id' => new sfWidgetFormInputHidden()));
$this->setValidators(array('title' => new sfValidatorString(array('max_length' => 255)), 'keywords' => new sfValidatorString(array('max_length' => 255)), 'description' => new sfValidatorString(array('required' => false)), 'is_active' => new sfValidatorBoolean(), 'created_at' => new sfValidatorDateTime(array('required' => false)), 'id' => new sfValidatorPropelChoice(array('model' => 'Meta', 'column' => 'id', 'required' => false))));
$this->widgetSchema->setNameFormat('meta[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
示例15: setup
public function setup()
{
$this->setWidgets(array('user_id' => new sfWidgetFormInputHidden(), 'remember_key' => new sfWidgetFormInput(), 'ip_address' => new sfWidgetFormInputHidden(), 'created_at' => new sfWidgetFormDateTime()));
$this->setValidators(array('user_id' => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)), 'remember_key' => new sfValidatorString(array('max_length' => 32, 'required' => false)), 'ip_address' => new sfValidatorPropelChoice(array('model' => 'sfGuardRememberKey', 'column' => 'ip_address', 'required' => false)), 'created_at' => new sfValidatorDateTime(array('required' => false))));
$this->widgetSchema->setNameFormat('sf_guard_remember_key[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}