Class with front-end (editing form) functionality.
More...
Class with front-end (editing form) functionality.
This is a base class of a class implemented by each component, and also has static methods.
- Copyright
- 2014 The Open University
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ allow_add()
core_availability\frontend::allow_add |
( |
| $course, |
|
|
cm_info | $cm = null, |
|
|
section_info | $section = null ) |
|
protected |
◆ convert_associative_array_for_js()
static core_availability\frontend::convert_associative_array_for_js |
( |
array | $inarray, |
|
|
| $keyname, |
|
|
| $valuename ) |
|
staticprotected |
Converts an associative array into an array of objects with two fields.
This is necessary because JavaScript associative arrays/objects are not ordered (at least officially according to the language specification).
- Parameters
-
array | $inarray | Associative array key => value |
string | $keyname | Name to use for key in resulting array objects |
string | $valuename | Name to use for value in resulting array objects |
- Return values
-
array | Non-associative (numeric) array |
◆ get_component()
core_availability\frontend::get_component |
( |
| ) |
|
|
protected |
Gets the Frankenstyle component name for this plugin.
- Return values
-
string | The component name for this plugin |
◆ get_javascript_init_params()
core_availability\frontend::get_javascript_init_params |
( |
| $course, |
|
|
cm_info | $cm = null, |
|
|
section_info | $section = null ) |
|
protected |
◆ get_javascript_strings()
core_availability\frontend::get_javascript_strings |
( |
| ) |
|
|
protected |
◆ include_all_javascript()
static core_availability\frontend::include_all_javascript |
( |
| $course, |
|
|
cm_info | $cm = null, |
|
|
section_info | $section = null ) |
|
static |
Includes JavaScript for the main system and all plugins.
- Parameters
-
stdClass | $course | Course object |
cm_info | $cm | Course-module currently being edited (null if none) |
section_info | $section | Section currently being edited (null if none) |
◆ report_validation_errors()
static core_availability\frontend::report_validation_errors |
( |
array | $data, |
|
|
array & | $errors ) |
|
static |
For use within forms, reports any validation errors from the availability field.
- Parameters
-
array | $data | Form data fields |
array | $errors | Error array |
The documentation for this class was generated from the following file:
- availability/classes/frontend.php