Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

H5P autoloader management class.

Copyright: 2019 Sara Arjona <sara@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 169 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: autoloader  - X-Ref

H5P autoloader management class.

get_all_handlers()   X-Ref
Returns the list of plugins that can work as H5P library handlers (have class PLUGINNAME\local\library\handler)

return: array with the format: pluginname => class

get_default_handler()   X-Ref
Returns the default H5P library handler class.

return: string|null H5P library handler class

get_default_handler_library()   X-Ref
Returns the default H5P library handler.

return: string|null H5P library handler

get_handler_classname()   X-Ref
Returns the current H5P library handler class.

return: string H5P library handler class

get_h5p_version()   X-Ref
Get the current version of the H5P core library.

return: string

get_h5p_core_library_url(?string $filepath = null, ?array $params = null)   X-Ref
Get a URL for the current H5P Core Library.

param: string $filepath The path within the h5p root
param: array $params these params override current params or add new
return: null|moodle_url

get_h5p_editor_library_url(?string $filepath = null, ?array $params = null)   X-Ref
Get a URL for the current H5P Editor Library.

param: string $filepath The path within the h5p root.
param: array $params These params override current params or add new.
return: null|\moodle_url The moodle_url instance to a file in the H5P Editor library.

get_h5p_editor_library_base(?string $filepath = null)   X-Ref
Get the base path for the current H5P Editor Library.

param: string $filepath The path within the h5p root.
return: string  Path to a file in the H5P Editor library.

get_h5p_string(string $identifier, string $language)   X-Ref
Returns a localized string, if it exists in the h5plib plugin and the value it's different from the English version.

param: string $identifier The key identifier for the localized string
param: string $language Language to get the localized string.
return: string|null The localized string or null if it doesn't exist in this H5P library plugin.

register()   X-Ref
Register the H5P autoloader.