This is the dropdown administration menu added in Totara 12.
Menu structure
The code that builds the menu is located in totara/core/classes/quickaccessmenu/.
Overview
The menu is built by taking the admin tree then merging in the default menu and any user preferences that are set. For details on default menu and preferences see below.
...
The process for creating the structure is first to fetch all admin nodes and create a quick access menu structure based on the nodes. Then check the 'default menu' and 'user preferences' to determine which nodes should be visible to a user.
Default menu
The default menu is build by checking all components to see if they define any menu items. To define default items a component/plugin must have a file located in <plugin>/classes/quickaccessmenu/. The structure of this file may be seen in the example for Quickaccess menu customisation.
User preferences
This includes any pages the user has add to/removed from the menu. These are serialised and stored in the quickaccess_preferences table.
Quick access menu customisation
Components can define their own items that will be added to the menu.
...
Note |
---|
The sort order number should be unique and may cause issues with re-ordering items if two have the same sort value. |
Define default override via config.php
The quick access menu default can be overridden in config.php by setting the $CFG->defaultquickaccessmenu variable.
...
- The key must be a valid admin node key
- The platform must be one of (platform, learn, perform, configuration)
Legacy administration menu
It is possible to enable the legacy administration menu by adding the following to your config.php file:
...