public function configure()
 {
     parent::configure();
     unset($this['embed']);
     $this->setValidator('service_url', new sfValidatorUrl(array('required' => true, 'trim' => true), array('required' => "Not a valid YouTube URL")));
     $this->widgetSchema->setFormFormatterName('aAdmin');
     $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('apostrophe');
 }
 public function configure()
 {
     parent::configure();
     unset($this['service_url']);
     // TODO: custom validator looking for appropriate tags only
     $this->setValidator('embed', new sfValidatorCallback(array('required' => true, 'callback' => 'aMediaVideoEmbedForm::validateEmbed'), array('required' => "Not a valid embed code", 'invalid' => "Not a valid embed code")));
     $this->setWidget('thumbnail', new aWidgetFormInputFilePersistent());
     $this->setValidator('thumbnail', new aValidatorFilePersistent(array('mime_types' => array('image/jpeg', 'image/png', 'image/gif'), "required" => !$this->getObject()->getId())));
     $this->widgetSchema->setFormFormatterName('aAdmin');
     $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('apostrophe');
 }