Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250530) (c39b7370636)
core_h5p\output\renderer Class Reference
Inheritance diagram for core_h5p\output\renderer:

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.
 

Member Function Documentation

◆ h5p_alter_filtered_parameters()

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.

Parameters
array | object$parametersThe content parameters for the library
string$nameThe machine readable name of the library
int$majorversionMajor version of the library
int$minorversionMinor version of the library

◆ h5p_alter_scripts()

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.

Parameters
array | object$scriptsList of JavaScripts that will be loaded
array$librariesArray of libraries indexed by the library's machineName
string$embedtypePossible values: div, iframe, external, editor

◆ h5p_alter_semantics()

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.

Parameters
object | object$semanticsSemantics as object
string$nameMachine name of library
int$majorversionMajor version of library
int$minorversionMinor version of library

◆ h5p_alter_styles()

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.

Parameters
stdClass[]$stylesList of stylesheets that will be loaded
array$librariesArray of libraries indexed by the library's machineName
string$embedtypePossible values: div, iframe, external, editor

The documentation for this class was generated from the following file: