|
| alterLibraryFiles (&$files, $libraries) |
| Alter styles and scripts.
|
|
| getAvailableLanguages ($machineName, $majorVersion, $minorVersion) |
| Load a list of available language codes from the database.
|
|
| getLanguage ($machineName, $majorVersion, $minorVersion, $language) |
| Load language file(JSON) from database.
|
|
| getLibraries ($libraries=NULL) |
| Decides which content types the editor should have.
|
|
| keepFile ($fileId) |
| "Callback" for mark the given file as a permanent file.
|
|
◆ alterLibraryFiles()
Moodle\H5peditorStorage::alterLibraryFiles |
( |
& | $files, |
|
|
| $libraries ) |
Alter styles and scripts.
- Parameters
-
array | $files | List of files as objects with path and version as properties |
array | $libraries | List of libraries indexed by machineName with objects as values. The objects have majorVersion and minorVersion as properties. |
Implemented in core_h5p\editor_framework.
◆ getAvailableLanguages()
Moodle\H5peditorStorage::getAvailableLanguages |
( |
| $machineName, |
|
|
| $majorVersion, |
|
|
| $minorVersion ) |
Load a list of available language codes from the database.
- Parameters
-
string | $machineName | The machine readable name of the library(content type) |
int | $majorVersion | Major part of version number |
int | $minorVersion | Minor part of version number |
- Return values
-
array | List of possible language codes |
Implemented in core_h5p\editor_framework.
◆ getLanguage()
Moodle\H5peditorStorage::getLanguage |
( |
| $machineName, |
|
|
| $majorVersion, |
|
|
| $minorVersion, |
|
|
| $language ) |
Load language file(JSON) from database.
This is used to translate the editor fields(title, description etc.)
- Parameters
-
string | $name | The machine readable name of the library(content type) |
int | $major | Major part of version number |
int | $minor | Minor part of version number |
string | $lang | Language code |
- Return values
-
string | Translation in JSON format |
Implemented in core_h5p\editor_framework.
◆ getLibraries()
Moodle\H5peditorStorage::getLibraries |
( |
| $libraries = NULL | ) |
|
Decides which content types the editor should have.
Two usecases:
- No input, will list all the available content types.
- Libraries supported are specified, load additional data and verify that the content types are available. Used by e.g. the Presentation Tool Editor that already knows which content types are supported in its slides.
- Parameters
-
array | $libraries | List of library names + version to load info for |
- Return values
-
array | List of all libraries loaded |
Implemented in core_h5p\editor_framework.
◆ keepFile()
Moodle\H5peditorStorage::keepFile |
( |
| $fileId | ) |
|
"Callback" for mark the given file as a permanent file.
Used when saving content that has new uploaded files.
- Parameters
-
Implemented in core_h5p\editor_framework.
◆ markFileForCleanup()
static Moodle\H5peditorStorage::markFileForCleanup |
( |
| $file, |
|
|
| $content_id ) |
|
static |
Marks a file for later cleanup, useful when files are not instantly cleaned up.
E.g. for files that are uploaded through the editor.
- Parameters
-
H5peditorFile | |
$content_id | |
Implemented in core_h5p\editor_framework.
◆ removeTemporarilySavedFiles()
static Moodle\H5peditorStorage::removeTemporarilySavedFiles |
( |
| $filePath | ) |
|
|
static |
◆ saveFileTemporarily()
static Moodle\H5peditorStorage::saveFileTemporarily |
( |
| $data, |
|
|
| $move_file ) |
|
static |
Saves a file or moves it temporarily.
This is often necessary in order to validate and store uploaded or fetched H5Ps.
- Parameters
-
string | $data | Uri of data that should be saved as a temporary file |
boolean | $move_file | Can be set to TRUE to move the data instead of saving it |
- Return values
-
bool|object | Returns false if saving failed or the path to the file if saving succeeded |
Implemented in core_h5p\editor_framework.
The documentation for this interface was generated from the following file:
- h5p/h5plib/v126/joubel/editor/h5peditor-storage.interface.php