HFP-1871 Add library config as a generic feature

HFP-2095-Fix-table-styling
Paal Joergensen 2018-08-27 14:53:17 +02:00
parent bbe99e4db8
commit 6959f65022
2 changed files with 19 additions and 0 deletions

View File

@ -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
*

View File

@ -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.
*