HFP-2654 Add default language as part of metadata
parent
2b2184fa30
commit
32b0840ca6
|
@ -40,6 +40,10 @@ abstract class H5PMetadata {
|
||||||
),
|
),
|
||||||
'yearTo' => array(
|
'yearTo' => array(
|
||||||
'type' => 'int'
|
'type' => 'int'
|
||||||
|
),
|
||||||
|
'defaultLanguage' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'maxLength' => 32,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -61,6 +65,7 @@ abstract class H5PMetadata {
|
||||||
',"yearFrom":' . (isset($content->year_from) ? $content->year_from : 'null') .
|
',"yearFrom":' . (isset($content->year_from) ? $content->year_from : 'null') .
|
||||||
',"yearTo":' . (isset($content->year_to) ? $content->year_to : 'null') .
|
',"yearTo":' . (isset($content->year_to) ? $content->year_to : 'null') .
|
||||||
',"changes":' . (isset($content->changes) ? $content->changes : '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') . '}';
|
',"authorComments":' . (isset($content->author_comments) ? json_encode($content->author_comments) : 'null') . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4568,6 +4568,11 @@ class H5PContentValidator {
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => 'none'
|
'widget' => 'none'
|
||||||
),
|
),
|
||||||
|
(object) array(
|
||||||
|
'name' => 'defaultLanguage',
|
||||||
|
'type' => 'text',
|
||||||
|
'widget' => 'none'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $semantics;
|
return $semantics;
|
||||||
|
|
Loading…
Reference in New Issue