1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- /**
- * NodeHome form base class.
- *
- * @package form
- * @subpackage node_home
- * @version SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
- */
- class BaseNodeHomeForm extends BaseFormPropel
- {
- public function setup()
- {
- $this->setWidgets(array(
- 'id' => new sfWidgetFormInputHidden(),
- 'node_id' => new sfWidgetFormPropelSelect(array('model' => 'Node', 'add_empty' => true)),
- 'edito_title' => new sfWidgetFormInput(),
- 'edito_content' => new sfWidgetFormTextarea(),
- ));
- $this->setValidators(array(
- 'id' => new sfValidatorPropelChoice(array('model' => 'NodeHome', 'column' => 'id', 'required' => false)),
- 'node_id' => new sfValidatorPropelChoice(array('model' => 'Node', 'column' => 'id', 'required' => false)),
- 'edito_title' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
- 'edito_content' => new sfValidatorString(array('required' => false)),
- ));
- $this->widgetSchema->setNameFormat('node_home[%s]');
- $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
- parent::setup();
- }
- public function getModelName()
- {
- return 'NodeHome';
- }
- }
|