Ejemplo n.º 1
0
 public function setAsset(sfSympalAsset $asset)
 {
     $this->setUploadDirectory($asset->getRootPath());
     $this->_asset = $asset;
     if ($this->_asset->isImage()) {
         $this->widgetSchema['width'] = new sfWidgetFormInput();
         $this->widgetSchema['height'] = new sfWidgetFormInput();
         $this->validatorSchema['width'] = new sfValidatorString(array('trim' => true));
         $this->validatorSchema['height'] = new sfValidatorString(array('trim' => true));
     }
 }