Posted By

ef on 02/07/11


Tagged

sfWidgetFormInputFileEditable


Versions (?)

Example of using sfWidgetFormInputFileEditable to add images in Symfony 1.4


 / Published in: Symfony
 

Example provides working solution to uploading and editing files in Symfony.

  1. $logoPicFileSrc = '/uploads/'.$this->getObject()->partner_logo_pic;
  2. $this->widgetSchema['logo_pic'] = new sfWidgetFormInputFileEditable(array('file_src' => logoPicFileSrc,
  3. 'is_image' => true,
  4. 'edit_mode' => !$this->isNew(),
  5. 'delete_label' => 'Usu� obrazek'));
  6.  
  7. $this->validatorSchema['logo_pic'] = new sfValidatorFile(array(
  8. 'mime_types' => 'web_images',
  9. 'path' => sfConfig::get('sf_upload_dir'),
  10. 'required' => false));
  11. $this->validatorSchema['logo_pic_delete'] = new sfValidatorBoolean();

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: rs2hotcom on October 10, 2019

fut 20 coins sell fifa 20 coins cheap fut 20 coins buy fut 20 coins discount fut 20 coins

Fifa Coins Cheap Fifa Coins Buy Fifa Coins Fifa Coins For Sale Fifa 20 Coins Buy Fifa 20 Coins Cheap Fifa 20 Coins Cheapest Fifa Coins Cheap FIFA Accounts Cheap Fifa Coins Account Fifa Points Account FIFA 20 Comfort Trade Safe Fifa 20 Coins Fifa 20 Coins PS4 FIFA 20 Comfort Trade Coins

You need to login to post a comment.