Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250530) (c39b7370636)
|
Public Member Functions | |
h5p_alter_filtered_parameters (&$parameters, string $name, int $majorversion, int $minorversion) | |
Alter parameters of H5P content after it has been filtered through semantics. | |
h5p_alter_scripts (&$scripts, array $libraries, string $embedtype) | |
Alter which scripts are loaded for H5P. | |
h5p_alter_semantics (&$semantics, $name, $majorversion, $minorversion) | |
Alter semantics before they are processed. | |
h5p_alter_styles (&$styles, array $libraries, string $embedtype) | |
Alter which stylesheets are loaded for H5P. | |
core_h5p\output\renderer::h5p_alter_filtered_parameters | ( | & | $parameters, |
string | $name, | ||
int | $majorversion, | ||
int | $minorversion ) |
Alter parameters of H5P content after it has been filtered through semantics.
This is useful for adapting the content to the current context.
array | object | $parameters | The content parameters for the library |
string | $name | The machine readable name of the library |
int | $majorversion | Major version of the library |
int | $minorversion | Minor version of the library |
core_h5p\output\renderer::h5p_alter_scripts | ( | & | $scripts, |
array | $libraries, | ||
string | $embedtype ) |
Alter which scripts are loaded for H5P.
This is useful for adding custom scripts or replacing existing ones.
array | object | $scripts | List of JavaScripts that will be loaded |
array | $libraries | Array of libraries indexed by the library's machineName |
string | $embedtype | Possible values: div, iframe, external, editor |
core_h5p\output\renderer::h5p_alter_semantics | ( | & | $semantics, |
$name, | |||
$majorversion, | |||
$minorversion ) |
Alter semantics before they are processed.
This is useful for changing how the editor looks and how content parameters are filtered.
object | object | $semantics | Semantics as object |
string | $name | Machine name of library |
int | $majorversion | Major version of library |
int | $minorversion | Minor version of library |
core_h5p\output\renderer::h5p_alter_styles | ( | & | $styles, |
array | $libraries, | ||
string | $embedtype ) |
Alter which stylesheets are loaded for H5P.
This is useful for adding custom styles or replacing existing ones.
This method can be overridden by other themes if the styles must be loaded from a different place than the "Raw initial SCSS" and "Raw SCSS" theme settings.
stdClass[] | $styles | List of stylesheets that will be loaded |
array | $libraries | Array of libraries indexed by the library's machineName |
string | $embedtype | Possible values: div, iframe, external, editor |