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