As with all subclasses, the actual initialization is done in the initialize() function,
not in the constructor, to allow for error handling.
This widget supports the video type or any subtype thereof.
All processing is done during the on_submit handlers, enforcing immediate update of the
associated storage objects. No other solution is possible, since we need to transfer
uploaded files somehow through multiple requests.
Available configuration options:
- boolean show_title: This flag controls whether the title field is shown or not.
If this is flag, the whole title processing will be disabled. This flag is true
by default.
Methods
_create_frozen_elements (array $elements)
Constructs the widget for frozen operation: Only a single static element is added
indicating the current type state.
Parameters
$elements
array
&$elements The array where the references to the created elements should
be added.
_create_replace_elements (array $elements)
Creates the elements to manage an existing upload, offering "delete" and "upload new file"
operations.
Parameters
$elements
array
&$elements The array where the references to the created elements should
be added.
_create_replace_elements_video ($elements)
_create_upload_elements (array $elements)
Creates the upload elements for empty types.
Parameters
$elements
array
&$elements The array where the references to the created elements should
be added.
_create_upload_elements_video ($elements)
_on_initialize ()
The initialization event handler post-processes the maxlength setting.
Returns
boolean
Indicating Success
add_action_elements (array $elements)
Adds common image operations to the QF.
Parameters
$elements
array
&$elements reference to the elements array to add the actions to
freeze ()
Freeze the entire group, special handling applies, the formgroup is replaced by a single
static element.
get_default ()
Populate the title field.
on_submit ($results)
The on_submit event handles all file uploads immediately.
They are passed through the type at that point. This is required, since we do not have
persistent upload file management on the QF side. Deletions take precedence over uploads.
Parameters
$results
unfreeze ()
Unfreeze the entire group, special handling applies, the formgroup is replaced by a the
full input widget set.
Properties
mixed $_upload_element_video
boolean $show_title
Controls title processing.
\HTML_QuickForm_file $_upload_element
The QF upload form element, used for processing.