HFP-2654 Add default language as part of metadata

pull/58/head
Thomas Marstrander 2019-02-21 13:42:00 +01:00
parent 2b2184fa30
commit 32b0840ca6
2 changed files with 10 additions and 0 deletions

View File

@ -40,6 +40,10 @@ abstract class H5PMetadata {
),
'yearTo' => array(
'type' => 'int'
),
'defaultLanguage' => array(
'type' => 'text',
'maxLength' => 32,
)
);
@ -61,6 +65,7 @@ abstract class H5PMetadata {
',"yearFrom":' . (isset($content->year_from) ? $content->year_from : 'null') .
',"yearTo":' . (isset($content->year_to) ? $content->year_to : 'null') .
',"changes":' . (isset($content->changes) ? $content->changes : 'null') .
',"defaultLanguage":' . (isset($content->default_language) ? $content->default_language : 'null') .
',"authorComments":' . (isset($content->author_comments) ? json_encode($content->author_comments) : 'null') . '}';
}

View File

@ -4568,6 +4568,11 @@ class H5PContentValidator {
'type' => 'text',
'widget' => 'none'
),
(object) array(
'name' => 'defaultLanguage',
'type' => 'text',
'widget' => 'none'
)
);
return $semantics;