H5P player class, for displaying any local H5P content.
More...
|
| __construct (string $url, stdClass $config, bool $preventredirect=true, string $component='', bool $skipcapcheck=false) |
| Inits the H5P player for rendering the content.
|
|
| add_assets_to_page () |
| Create the H5PIntegration variable that will be included in the page.
|
|
| get_context () |
| Get the context where the .h5p file belongs.
|
|
| get_export_file () |
| Return the info export file for Mobile App.
|
|
| get_messages () |
| Get the error messages stored in our H5P framework.
|
|
| get_title () |
| Get the title of the H5P content to display.
|
|
| output () |
| Outputs H5P wrapper HTML.
|
|
|
static | display (string $url, stdClass $config, bool $preventredirect=true, string $component='', bool $displayedit=false) |
| Get the encoded URL for embeding this H5P content.
|
|
static | get_embed_url (string $url, string $component='') |
| Get the encoded URL for embeding this H5P content.
|
|
H5P player class, for displaying any local H5P content.
- Copyright
- 2019 Sara Arjona sara@.nosp@m.mood.nosp@m.le.co.nosp@m.m
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_h5p\player::__construct |
( |
string | $url, |
|
|
stdClass | $config, |
|
|
bool | $preventredirect = true, |
|
|
string | $component = '', |
|
|
bool | $skipcapcheck = false ) |
Inits the H5P player for rendering the content.
- Parameters
-
string | $url | Local URL of the H5P file to display. |
stdClass | $config | Configuration for H5P buttons. |
bool | $preventredirect | Set to true in scripts that can not redirect (CLI, RSS feeds, etc.), throws exceptions |
string | $component | optional moodle component to sent xAPI tracking |
bool | $skipcapcheck | Whether capabilities should be checked or not to get the pluginfile URL because sometimes they might be controlled before calling this method. |
◆ add_assets_to_page()
core_h5p\player::add_assets_to_page |
( |
| ) |
|
Create the H5PIntegration variable that will be included in the page.
This variable is used as the main H5P config variable.
◆ display()
static core_h5p\player::display |
( |
string | $url, |
|
|
stdClass | $config, |
|
|
bool | $preventredirect = true, |
|
|
string | $component = '', |
|
|
bool | $displayedit = false ) |
|
static |
Get the encoded URL for embeding this H5P content.
- Parameters
-
string | $url | Local URL of the H5P file to display. |
stdClass | $config | Configuration for H5P buttons. |
bool | $preventredirect | Set to true in scripts that can not redirect (CLI, RSS feeds, etc.), throws exceptions |
string | $component | optional moodle component to sent xAPI tracking |
bool | $displayedit | Whether the edit button should be displayed below the H5P content. |
- Return values
-
string | The embedable code to display a H5P file. |
◆ get_context()
core_h5p\player::get_context |
( |
| ) |
|
Get the context where the .h5p file belongs.
- Return values
-
◆ get_embed_url()
static core_h5p\player::get_embed_url |
( |
string | $url, |
|
|
string | $component = '' ) |
|
static |
Get the encoded URL for embeding this H5P content.
- Parameters
-
string | $url | The URL of the .h5p file. |
string | $component | optional Moodle component to send xAPI tracking |
- Return values
-
◆ get_export_file()
core_h5p\player::get_export_file |
( |
| ) |
|
Return the info export file for Mobile App.
- Return values
-
◆ get_messages()
core_h5p\player::get_messages |
( |
| ) |
|
Get the error messages stored in our H5P framework.
- Return values
-
stdClass | with framework error messages. |
◆ get_title()
core_h5p\player::get_title |
( |
| ) |
|
Get the title of the H5P content to display.
- Return values
-
◆ output()
core_h5p\player::output |
( |
| ) |
|
Outputs H5P wrapper HTML.
- Return values
-
string | The HTML code to display this H5P content. |
The documentation for this class was generated from the following file: