Created
April 17, 2012 11:51
-
-
Save umpirsky/2405545 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 | |
namespace Acme\DemoBundle\Form\Type; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilder; | |
class PictureType extends AbstractType | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('data', 'hidden') | |
->add('picture_uploadify', 'uploadify_resource', array( | |
'data' => array( | |
'folder' => '/uploads/files/', | |
'preview' => 'picture_preview', | |
'path' => 'AcmeDemoBundle_upload', | |
'copy' => $this->getName() . '_' . 'data' | |
), | |
'uploadify' => array( | |
'auto' => false, | |
'multi' => true, | |
// ... other options from http://www.uploadify.com/documentation/ | |
), | |
'property_path' => false | |
)) | |
; | |
} | |
public function getName() | |
{ | |
return "picture_type"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment