/**
  * Constructor.
  *
  * Available options:
  *
  *  * file_src:     The current image web source path (required)
  *  * edit_mode:    A Boolean: true to enabled edit mode, false otherwise
  *  * is_image:     Whether the file is a displayable image
  *  * with_delete:  Whether to add a delete checkbox or not
  *  * delete_label: The delete label used by the template
  *  * template:     The HTML template to use to render this widget
  *                  The available placeholders are:
  *                    * input (the image upload widget)
  *                    * delete (the delete checkbox)
  *                    * delete_label (the delete label text)
  *                    * file (the file tag)
  *
  * In edit mode, this widget renders an additional widget named after the
  * file upload widget with a "_delete" suffix. So, when creating a form,
  * don't forget to add a validator for this additional field.
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInputFile
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->setOption('type', 'file');
     $this->setOption('needs_multipart', true);
     $this->addRequiredOption('file_src');
     $this->addOption('is_image', false);
     $this->addOption('edit_mode', true);
     $this->addOption('with_delete', true);
     $this->addOption('delete_label', 'remove the current file');
     $this->addOption('template', '%file%<br />%input%<br />%delete% %delete_label%');
 }
 /**
  * Constructor.
  *
  * Available options:
  *
  *  * file_src:     The current image web source path (required)
  *  * with_delete:  Whether to add a delete checkbox or not
  *  * delete_label: The delete label used by the template
  *  * image_field:
  *  * image_ratio:
  *  * invoker:
  *  * template:     The HTML template to use to render this widget
  *                  The available placeholders are:
  *                    * input (the image upload widget)
  *                    * delete (the delete checkbox)
  *                    * delete_label (the delete label text)
  *                    * file (the file tag)
  *  * form:
  *
  * In edit mode, this widget renders an additional widget named after the
  * file upload widget with a "_delete" suffix. So, when creating a form,
  * don't forget to add a validator for this additional field.
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInputFile
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->setOption('type', 'file');
     $this->setOption('needs_multipart', true);
     $this->addRequiredOption('file_src');
     $this->addOption('with_delete', true);
     $this->addOption('delete_label', 'remove the current file');
     $this->addOption('image_field', null);
     $this->addOption('image_ratio', null);
     $this->addOption('invoker', null);
     $this->addOption('template', '%file%<br />%input%<br />%delete% %delete_label%');
     $this->addOption('form', null);
 }
 /**
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInput
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('custom_javascripts', array());
     $this->addOption('prevent_form_submit', true);
     $this->addOption('collapse_queue_on_init', true);
     $this->addOption('send_serialized_values', true);
     $this->addOption('require_yui', false);
     $this->addOption('swfupload_upload_url', $_SERVER['REQUEST_URI']);
     $this->addOption('swfupload_post_name', null);
     $this->addOption('swfupload_post_params', '');
     $this->addOption('swfupload_file_types', '*.jpg;*.jpeg;*.gif;*.png');
     $this->addOption('swfupload_file_types_description', 'Web images');
     $this->addOption('swfupload_file_size_limit', ini_get('upload_max_filesize'));
     $this->addOption('swfupload_file_upload_limit', 0);
     $this->addOption('swfupload_file_queue_limit', 0);
     $this->addOption('swfupload_flash_url', public_path('/sfWidgetFormInputSWFUploadPlugin/js/vendor/swfupload/Flash/swfupload.swf'));
     $this->addOption('swfupload_css_path', public_path('/sfWidgetFormInputSWFUploadPlugin/css/swfupload.css'));
     $this->addOption('swfupload_js_path', public_path('/sfWidgetFormInputSWFUploadPlugin/js/vendor/swfupload/swfupload.js'));
     $this->addOption('swfupload_handler_path', public_path('/sfWidgetFormInputSWFUploadPlugin/js/swfupload-widget-handler.js'));
     $this->addOption('swfupload_plugins_dir', public_path('/sfWidgetFormInputSWFUploadPlugin/js/vendor/swfupload/plugins'));
     $this->addOption('swfupload_button_image_url', null);
     $this->addOption('swfupload_button_width', 100);
     $this->addOption('swfupload_button_height', 18);
     $this->addOption('swfupload_button_text', '');
     $this->addOption('swfupload_button_text_style', '');
     $this->addOption('swfupload_button_text_left_padding', 0);
     $this->addOption('swfupload_button_text_top_padding', 0);
     $this->addOption('swfupload_button_disabled', 'false');
     $this->addOption('swfupload_button_cursor', 'SWFUpload.CURSOR.ARROW');
     $this->addOption('swfupload_button_window_mode', 'SWFUpload.WINDOW_MODE.TRANSPARENT');
     $this->addOption('swfupload_button_action', 'SWFUpload.BUTTON_ACTION.SELECT_FILES');
     $this->addOption('swfupload_swfupload_loaded_handler', 'swfu_widget.handlers.onLoad');
     $this->addOption('swfupload_file_dialog_start_handler', 'swfu_widget.handlers.onFileDialogStart');
     $this->addOption('swfupload_file_queued_handler', 'swfu_widget.handlers.onFileQueued');
     $this->addOption('swfupload_file_queue_error_handler', 'swfu_widget.handlers.onFileQueueError');
     $this->addOption('swfupload_file_dialog_complete_handler', 'swfu_widget.handlers.onFileDialogComplete');
     $this->addOption('swfupload_upload_start_handler', 'swfu_widget.handlers.onUploadStart');
     $this->addOption('swfupload_upload_progress_handler', 'swfu_widget.handlers.onUploadProgress');
     $this->addOption('swfupload_upload_error_handler', 'swfu_widget.handlers.onUploadError');
     $this->addOption('swfupload_upload_success_handler', 'swfu_widget.handlers.onUploadSuccess');
     $this->addOption('swfupload_upload_complete_handler', 'swfu_widget.handlers.onUploadComplete');
     $this->addOption('swfupload_queue_complete_handler', 'swfu_widget.handlers.onQueueComplete');
     $this->addOption('swfupload_swfupload_pre_load_handler', 'swfu_widget.handlers.onPreLoad');
     $this->addOption('swfupload_swfupload_load_failed_handler', 'swfu_widget.handlers.onLoadFailed');
     $this->addOption('swfupload_minimum_flash_version', '9.0.28');
 }
 /**
  * Configures the current widget.
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInput
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('multiple', true);
 }
 /**
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInput
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
 }
 /**
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInput
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('uploadify_path', '/ddAdvancedImageUploader/vendor/jquery-uploadify');
     $this->addOption('include_jquery', false);
 }