|
static | boolifyAndEncodeSettings ($metadataSettings) |
| The metadataSettings field in libraryJson uses 1 for true and 0 for false.
|
|
static | toDBArray ($metadata, $include_title=true, $include_missing=true, &$types=array()) |
| Make the metadata into an associative array keyed by the property names.
|
|
static | toJSON ($content) |
| JSON encode metadata.
|
|
◆ boolifyAndEncodeSettings()
static Moodle\H5PMetadata::boolifyAndEncodeSettings |
( |
| $metadataSettings | ) |
|
|
static |
The metadataSettings field in libraryJson uses 1 for true and 0 for false.
Here we are converting these to booleans, and also doing JSON encoding. This is invoked before the library data is beeing inserted/updated to DB.
- Parameters
-
- Return values
-
◆ toDBArray()
static Moodle\H5PMetadata::toDBArray |
( |
| $metadata, |
|
|
| $include_title = true, |
|
|
| $include_missing = true, |
|
|
& | $types = array() ) |
|
static |
Make the metadata into an associative array keyed by the property names.
- Parameters
-
mixed | $metadata | Array or object containing metadata |
bool | $include_title | |
bool | $include_missing | For metadata fields not being set, skip 'em. Relevant for content upgrade |
array | $types | |
- Return values
-
◆ toJSON()
static Moodle\H5PMetadata::toJSON |
( |
| $content | ) |
|
|
static |
JSON encode metadata.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file:
- h5p/h5plib/v126/joubel/core/h5p-metadata.class.php