MDL-67786 core_contentbank: New content bank contenttype plugin type

Co-authored by: Ferran Recio <[email protected]>
This commit is contained in:
Amaia Anabitarte
2020-04-15 23:45:08 +02:00
parent df0e58adb1
commit 33b8ca26f9
32 changed files with 1851 additions and 5 deletions
+13
View File
@@ -657,6 +657,19 @@ if ($hassiteconfig) {
}
}
// Content bank content types.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('contenbanksettings', new lang_string('contentbank')));
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
$temp->add(new admin_setting_managecontentbankcontenttypes());
$ADMIN->add('contenbanksettings', $temp);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\contentbank $plugin */
$plugin->load_settings($ADMIN, 'contenbanksettings', $hassiteconfig);
}
}
/// Add all local plugins - must be always last!
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));