|
| __construct ($elementName=null, $elementLabel=null, $attributes=null, $options=null) |
| Constructor. More...
|
|
| export_for_template (renderer_base $output) |
| Function to export the renderer data in a format that is suitable for a mustache template. More...
|
|
| getAreamaxbytes () |
| Returns the maximum size of the area. More...
|
|
| getElementTemplateType () |
| Returns type of filemanager element. More...
|
|
| getHelpButton () |
| Returns html for help button. More...
|
|
| getMaxbytes () |
| Returns maximum file size which can be uploaded. More...
|
|
| getMaxfiles () |
| Returns maximum number of files which can be uploaded. More...
|
|
| getName () |
| Returns name of filemanager. More...
|
|
| getSubdirs () |
| Returns true if subdirectoy can be created, else false. More...
|
|
| getValue () |
| Returns filemanager attribute value. More...
|
|
| MoodleQuickForm_filemanager ($elementName=null, $elementLabel=null, $attributes=null, $options=null) |
| Old syntax of class constructor. More...
|
|
| onQuickFormEvent ($event, $arg, &$caller) |
| Called by HTML_QuickForm whenever form event is made on this element. More...
|
|
| setAreamaxbytes ($areamaxbytes) |
| Sets the maximum size of the area. More...
|
|
| setMaxbytes ($maxbytes) |
| Sets maximum file size which can be uploaded. More...
|
|
| setMaxfiles ($num) |
| Sets maximum number of files which can be uploaded. More...
|
|
| setName ($name) |
| Sets name of filemanager. More...
|
|
| setSubdirs ($allow) |
| Set option to create sub directory, while uploading file. More...
|
|
| setValue ($value) |
| Updates filemanager attribute value. More...
|
|
| toHtml () |
| Returns HTML for filemanager form element. More...
|
|
| validateSubmitValue ($value) |
| Check that all files have the allowed type. More...
|
|
|
string | $_helpbutton = '' |
| html for help button, if empty then no help will icon will be dispalyed.
|
|
◆ __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 | $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 |
|
) |
| |
Old syntax of class constructor.
Deprecated in PHP7.
- Deprecated:
- since Moodle 3.1
◆ 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: