4
* agEntityRelationshipType form base class.
6
* @method agEntityRelationshipType getObject() Returns the current form's model object
11
* @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
13
abstract class BaseagEntityRelationshipTypeForm extends BaseFormDoctrine
15
public function setup()
17
$this->setWidgets(array(
18
'id' => new sfWidgetFormInputHidden(),
19
'entity_relationship_type' => new sfWidgetFormInputText(),
20
'entity_relationship_type_desc' => new sfWidgetFormInputText(),
21
'created_at' => new sfWidgetFormDateTime(),
22
'updated_at' => new sfWidgetFormDateTime(),
25
$this->setValidators(array(
26
'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
27
'entity_relationship_type' => new sfValidatorString(array('max_length' => 32)),
28
'entity_relationship_type_desc' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
29
'created_at' => new sfValidatorDateTime(),
30
'updated_at' => new sfValidatorDateTime(),
33
$this->validatorSchema->setPostValidator(
34
new sfValidatorDoctrineUnique(array('model' => 'agEntityRelationshipType', 'column' => array('entity_relationship_type')))
37
$this->widgetSchema->setNameFormat('ag_entity_relationship_type[%s]');
39
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
41
$this->setupInheritance();
46
public function getModelName()
48
return 'agEntityRelationshipType';
b'\\ No newline at end of file'