Adding Navigation to a Local Plugin


Here's how to add your local plugin to the following navigation through the settings.php file:

Site Administration > Plugins > Local Plugins
// Add the settings page to the navigation block

$settings = new admin_settingpage(
    'local_yourplugin', 
    get_string('pluginname', 'local_yourplugin')
);

$ADMIN->add('localplugins', $settings);

The final line $ADMIN->add('localplugins', $settings); determines where the plugin wll be placed so you can change localplugins to other common locations have a look at /admin/settings/plugins.php for some other examples.


Revision #1
Created Sun, Aug 4, 2019 11:43 AM by Moodle Wiki
Updated Sun, Aug 4, 2019 11:51 AM by Moodle Wiki