HFP-1871 Add library config as a generic feature
parent
bbe99e4db8
commit
6959f65022
|
@ -108,6 +108,14 @@ interface H5PFrameworkInterface {
|
|||
*/
|
||||
public function loadAddons();
|
||||
|
||||
/**
|
||||
* Load config for libraries
|
||||
*
|
||||
* @param array $libraries
|
||||
* @return array
|
||||
*/
|
||||
public function getLibraryConfig($libraries = NULL);
|
||||
|
||||
/**
|
||||
* Get a list of the current installed libraries
|
||||
*
|
||||
|
|
11
js/h5p.js
11
js/h5p.js
|
@ -2242,6 +2242,17 @@ H5P.createTitle = function (rawTitle, maxLength) {
|
|||
H5P.externalDispatcher.trigger('datainclipboard', {reset: false});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get config for a library
|
||||
*
|
||||
* @param string machineName
|
||||
* @return Object
|
||||
*/
|
||||
H5P.getLibraryConfig = function (machineName) {
|
||||
var hasConfig = H5PIntegration.libraryConfig && H5PIntegration.libraryConfig[machineName];
|
||||
return hasConfig ? H5PIntegration.libraryConfig[machineName] : {};
|
||||
};
|
||||
|
||||
/**
|
||||
* Get item from the H5P Clipboard.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue