-
Task
-
Resolution: Deferred
-
Minor
-
None
-
4.0
-
MOODLE_400_STABLE
-
MDL-70209-master-1 -
-
1
-
4.0 Navigation blitz
Implement base class & file structure.
Within this sub-task we want the base structure of the new Moodle 4.0 navigation to be implemented.
Add required functions for navigation_node.
Within this sub-task we need to add functionality to fetch navigation_node's to populate the navigation view by calling the settings_navigation functions that generates the system context nodes. It may be likely that we emulate a lot of the initialise() to populate this new navigation.
Acceptance criteria
- Using the example structure within this issue, create the required sub directories & files
- Using the example within this issue, implement the base functions within the primary navigation class
- Implement new magic method for primary navigation
- $PAGE->primarynavigationview calls the function magic_get_primarynavview within lib/pagelib. This would create a new primary_navigation_view and triggers the initialise function within primary_navigation_view.
- Confirm the primary navigation elements in the design for the primary navigation are returned by the new class
Example structure:
/lib/classes
/navigation
/views
/primary.php
Example class stub:
class primary_navigation_view extends navigation_node {
// Sets up the view with basic settings and preparse it for use.
public function __construct(array $properties) {}
// Initialise the view based navigation based on the current context.
public function initialise() {}
/This function recursively scans nodes until it finds the active node or there are no more nodes.
etc.....
}
Footnote:
This issue is slightly different from its counterpart within the secondary navigation series of issues. This issue rolls both the basic creation of files & classes with the implementation of the initialise function and population of the primary navigation view.
- is child of
-
MDL-70207 Implement backend functionality for primary navigation
- Closed