Created
August 19, 2010 11:50
-
-
Save caefer/537682 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* BarfooArticle form. | |
* | |
* @package integration | |
* @subpackage form | |
* @author caefer <[email protected]> | |
* @version SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | |
*/ | |
class BarfooArticleForm extends BaseBarfooArticleForm | |
{ | |
public function configure() | |
{ | |
$this->widgetSchema['topImage'] = new sfWidgetFormInputFileEditable(array( | |
'label' => 'Image', | |
'is_image' => true, | |
'file_src' => '/uploads/barfooarticle/'.$this->getObject()->topImage | |
)); | |
$this->validatorSchema['topImage'] = new sfValidatorFile(array( | |
'required' => false, | |
'path' => sfConfig::get('sf_upload_dir').'/barfooarticle', | |
'mime_types' => 'web_images', | |
)); | |
$this->validatorSchema['topImage_delete'] = new sfValidatorPass(); | |
$this->widgetSchema['centerImage'] = new sfWidgetFormInputFileEditable(array( | |
'label' => 'Image', | |
'is_image' => true, | |
'file_src' => '/uploads/barfooarticle/'.$this->getObject()->centerImage | |
)); | |
$this->validatorSchema['centerImage'] = new sfValidatorFile(array( | |
'required' => false, | |
'path' => sfConfig::get('sf_upload_dir').'/barfooarticle', | |
'mime_types' => 'web_images', | |
)); | |
$this->validatorSchema['centerImage_delete'] = new sfValidatorPass(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment