diff -r d2af8a210f5d -r 8e4fe6f3337d thd/lib/form/doctrine/base/BaseThdFilmForm.class.php --- a/thd/lib/form/doctrine/base/BaseThdFilmForm.class.php Wed Jun 01 14:07:43 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -setWidgets(array( - 'id' => new sfWidgetFormInputHidden(), - 'ref' => new sfWidgetFormDoctrineChoice(array('model' => 'ThdImage', 'add_empty' => false)), - 'title' => new sfWidgetFormInput(), - 'pitch' => new sfWidgetFormTextarea(), - 'duration' => new sfWidgetFormInput(), - 'directors' => new sfWidgetFormTextarea(), - 'actors' => new sfWidgetFormTextarea(), - 'slug_url' => new sfWidgetFormInput(), - 'original_title' => new sfWidgetFormInput(), - 'production_year' => new sfWidgetFormInput(), - )); - - $this->setValidators(array( - 'id' => new sfValidatorDoctrineChoice(array('model' => 'ThdFilm', 'column' => 'id', 'required' => false)), - 'ref' => new sfValidatorDoctrineChoice(array('model' => 'ThdImage')), - 'title' => new sfValidatorString(array('max_length' => 255)), - 'pitch' => new sfValidatorString(array('max_length' => 2147483647)), - 'duration' => new sfValidatorInteger(), - 'directors' => new sfValidatorString(array('max_length' => 2147483647)), - 'actors' => new sfValidatorString(array('max_length' => 2147483647)), - 'slug_url' => new sfValidatorString(array('max_length' => 255)), - 'original_title' => new sfValidatorString(array('max_length' => 255, 'required' => false)), - 'production_year' => new sfValidatorInteger(array('required' => false)), - )); - - $this->widgetSchema->setNameFormat('thd_film[%s]'); - - $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); - - parent::setup(); - } - - public function getModelName() - { - return 'ThdFilm'; - } - -}