MDL-72930 navigation: Remove duplicated navigation boxes.

Some pages have settings that really aren't required anymore.
These have been removed and a function has been aded so that other
developers can turn off the navigation overflow if they want.
This commit is contained in:
Adrian Greeve 2021-12-22 09:23:24 +08:00
parent f56ecc27f9
commit 0a04ebde11
4 changed files with 31 additions and 28 deletions

View file

@ -408,6 +408,11 @@ class moodle_page {
*/
protected $_activityheader;
/**
* @var bool The value of displaying the navigation overflow.
*/
protected $_navigationoverflow = true;
/**
* Force the settings menu to be displayed on this page. This will only force the
* settings menu on an activity / resource page that is being displayed on a theme that
@ -2258,4 +2263,23 @@ class moodle_page {
public function get_primary_activate_tab(): ?string {
return $this->_activenodeprimary;
}
/**
* Sets the navigation overflow state. This allows developers to turn off the overflow menu if they perhaps are using
* some other navigation to show settings.
*
* @param bool $state The state of whether to show the navigation overflow.
*/
public function set_navigation_overflow_state(bool $state): void {
$this->_navigationoverflow = $state;
}
/**
* Gets the navigation overflow state.
*
* @return bool The navigation overflow state.
*/
public function get_navigation_overflow_state(): bool {
return $this->_navigationoverflow;
}
}