Filemanager form element.
More...
|
| | __construct ($elementName=null, $elementLabel=null, $attributes=null, $options=null) |
| | Constructor.
|
| |
| | export_for_template (renderer_base $output) |
| | Function to export the renderer data in a format that is suitable for a mustache template.
|
| |
| | getAreamaxbytes () |
| | Returns the maximum size of the area.
|
| |
| | getElementTemplateType () |
| | Returns type of filemanager element.
|
| |
| | getHelpButton () |
| | Returns html for help button.
|
| |
| | getMaxbytes () |
| | Returns maximum file size which can be uploaded.
|
| |
| | getMaxfiles () |
| | Returns maximum number of files which can be uploaded.
|
| |
| | getName () |
| | Returns name of filemanager.
|
| |
| | getSubdirs () |
| | Returns true if subdirectoy can be created, else false.
|
| |
| | getValue () |
| | Returns filemanager attribute value.
|
| |
| | MoodleQuickForm_filemanager ($elementName=null, $elementLabel=null, $attributes=null, $options=null) |
| | Old syntax of class constructor.
|
| |
| | onQuickFormEvent ($event, $arg, &$caller) |
| | Called by HTML_QuickForm whenever form event is made on this element.
|
| |
| | setAreamaxbytes ($areamaxbytes) |
| | Sets the maximum size of the area.
|
| |
| | setMaxbytes ($maxbytes) |
| | Sets maximum file size which can be uploaded.
|
| |
| | setMaxfiles ($num) |
| | Sets maximum number of files which can be uploaded.
|
| |
| | setName ($name) |
| | Sets name of filemanager.
|
| |
| | setSubdirs ($allow) |
| | Set option to create sub directory, while uploading file.
|
| |
| | setValue ($value) |
| | Updates filemanager attribute value.
|
| |
| | toHtml () |
| | Returns HTML for filemanager form element.
|
| |
| | validateSubmitValue ($value) |
| | Check that all files have the allowed type.
|
| |
|
|
string | $_helpbutton = '' |
| | html for help button, if empty then no help will icon will be dispalyed.
|
| |
|
| array | $_options |
| | options provided to initalize filemanager
|
| |
Filemanager form element.
FilemaneManager lets user to upload/manage multiple files
- Copyright
- 2009 Dongsheng Cai dongs.nosp@m.heng.nosp@m.@mood.nosp@m.le.c.nosp@m.om
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
| MoodleQuickForm_filemanager::__construct |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $attributes = null, |
|
|
| $options = null ) |
Constructor.
- Parameters
-
| string | $elementName | (optional) name of the filemanager |
| string | $elementLabel | (optional) filemanager label |
| array | $attributes | (optional) Either a typical HTML attribute string or an associative array |
| array | stdClass | $options | set of options to initalize filemanager |
◆ export_for_template()
| MoodleQuickForm_filemanager::export_for_template |
( |
renderer_base | $output | ) |
|
Function to export the renderer data in a format that is suitable for a mustache template.
This means:
- No complex types - only stdClass, array, int, string, float, bool
- Any additional info that is required for the template is pre-calculated (e.g. capability checks).
- Parameters
-
| renderer_base | $output | Used to do a final render of any components that need to be rendered for export. |
- Return values
-
Implements templatable.
◆ getAreamaxbytes()
| MoodleQuickForm_filemanager::getAreamaxbytes |
( |
| ) |
|
Returns the maximum size of the area.
- Return values
-
◆ getElementTemplateType()
| MoodleQuickForm_filemanager::getElementTemplateType |
( |
| ) |
|
Returns type of filemanager element.
- Return values
-
◆ getHelpButton()
| MoodleQuickForm_filemanager::getHelpButton |
( |
| ) |
|
Returns html for help button.
- Return values
-
| string | html for help button |
◆ getMaxbytes()
| MoodleQuickForm_filemanager::getMaxbytes |
( |
| ) |
|
Returns maximum file size which can be uploaded.
- Return values
-
◆ getMaxfiles()
| MoodleQuickForm_filemanager::getMaxfiles |
( |
| ) |
|
Returns maximum number of files which can be uploaded.
- Return values
-
◆ getName()
| MoodleQuickForm_filemanager::getName |
( |
| ) |
|
Returns name of filemanager.
- Return values
-
◆ getSubdirs()
| MoodleQuickForm_filemanager::getSubdirs |
( |
| ) |
|
Returns true if subdirectoy can be created, else false.
- Return values
-
◆ getValue()
| MoodleQuickForm_filemanager::getValue |
( |
| ) |
|
Returns filemanager attribute value.
- Return values
-
◆ MoodleQuickForm_filemanager()
| MoodleQuickForm_filemanager::MoodleQuickForm_filemanager |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $attributes = null, |
|
|
| $options = null ) |
◆ onQuickFormEvent()
| MoodleQuickForm_filemanager::onQuickFormEvent |
( |
| $event, |
|
|
| $arg, |
|
|
& | $caller ) |
Called by HTML_QuickForm whenever form event is made on this element.
- Parameters
-
| string | $event | Name of event |
| mixed | $arg | event arguments |
| object | $caller | calling object |
- Return values
-
◆ setAreamaxbytes()
| MoodleQuickForm_filemanager::setAreamaxbytes |
( |
| $areamaxbytes | ) |
|
Sets the maximum size of the area.
- Parameters
-
| int | $areamaxbytes | size limit |
◆ setMaxbytes()
| MoodleQuickForm_filemanager::setMaxbytes |
( |
| $maxbytes | ) |
|
Sets maximum file size which can be uploaded.
- Parameters
-
◆ setMaxfiles()
| MoodleQuickForm_filemanager::setMaxfiles |
( |
| $num | ) |
|
Sets maximum number of files which can be uploaded.
- Parameters
-
◆ setName()
| MoodleQuickForm_filemanager::setName |
( |
| $name | ) |
|
Sets name of filemanager.
- Parameters
-
| string | $name | name of the filemanager |
◆ setSubdirs()
| MoodleQuickForm_filemanager::setSubdirs |
( |
| $allow | ) |
|
Set option to create sub directory, while uploading file.
- Parameters
-
| bool | $allow | true if sub directory can be created. |
◆ setValue()
| MoodleQuickForm_filemanager::setValue |
( |
| $value | ) |
|
Updates filemanager attribute value.
- Parameters
-
◆ toHtml()
| MoodleQuickForm_filemanager::toHtml |
( |
| ) |
|
Returns HTML for filemanager form element.
- Return values
-
◆ validateSubmitValue()
| MoodleQuickForm_filemanager::validateSubmitValue |
( |
| $value | ) |
|
Check that all files have the allowed type.
- Parameters
-
| int | $value | Draft item id with the uploaded files. |
- Return values
-
| string|null | Validation error message or null. |
◆ $_options
| array MoodleQuickForm_filemanager::$_options |
|
protected |
Initial value:= array('mainfile' => '', 'subdirs' => 1, 'maxbytes' => -1, 'maxfiles' => -1,
const FILE_AREA_MAX_BYTES_UNLIMITED
Unlimited area size constant.
Definition filelib.php:41
options provided to initalize filemanager
The documentation for this class was generated from the following file: