Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70209

Implement base structure & population of primary navigation view

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 4.0
    • Navigation
    • 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.

            peterdias Peter Dias
            mathewmay Mathew May
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.