MDL-51107 navigationlib: Plugins can extend navigation category settings
This commit is contained in:
@@ -4616,6 +4616,14 @@ class settings_navigation extends navigation_node {
|
||||
$categorynode->add(get_string('restorecourse', 'admin'), $url, self::TYPE_SETTING, null, 'restorecourse', new pix_icon('i/restore', ''));
|
||||
}
|
||||
|
||||
// Let plugins hook into category settings navigation.
|
||||
$pluginsfunction = get_plugins_with_function('extend_navigation_category_settings', 'lib.php');
|
||||
foreach ($pluginsfunction as $plugintype => $plugins) {
|
||||
foreach ($plugins as $pluginfunction) {
|
||||
$pluginfunction($categorynode, $catcontext);
|
||||
}
|
||||
}
|
||||
|
||||
return $categorynode;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@ information provided here is intended especially for developers.
|
||||
* external_api::validate_context now is public, it can be called from other classes.
|
||||
* rss_error() now supports returning of correct HTTP status of error and will return '404 Not Found'
|
||||
unless other status is specified.
|
||||
* Plugins can extend the navigation for categories settings by declaring the following callback:
|
||||
<frankenstyle>_extend_navigation_category_settings(navigation_node, context_coursecat)
|
||||
|
||||
=== 2.9.1 ===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user