mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
navigation MDL-14632 Deprecate print_header menu argument and provide PAGE method
This commit is contained in:
parent
b7510c3aa8
commit
e120c61d24
7 changed files with 33 additions and 18 deletions
|
@ -132,6 +132,8 @@ class moodle_page {
|
|||
protected $_settingsnav = null;
|
||||
/** @var null|navbar Contains the navbar structure*/
|
||||
protected $_navbar = null;
|
||||
/** @var string */
|
||||
protected $_headingmenu = null;
|
||||
|
||||
/**
|
||||
* Then the theme is initialsed, we save the stack trace, for use in error messages.
|
||||
|
@ -322,6 +324,14 @@ class moodle_page {
|
|||
return $this->_heading;
|
||||
}
|
||||
|
||||
/**
|
||||
* Please do not call this method directly, use the ->heading syntax. {@link __get()}.
|
||||
* @return string The menu (or actions) to display in the heading
|
||||
*/
|
||||
public function get_headingmenu() {
|
||||
return $this->_headingmenu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Please do not call this method directly, use the ->docspath syntax. {@link __get()}.
|
||||
* @return string the path to the Moodle docs for this page.
|
||||
|
@ -705,7 +715,7 @@ class moodle_page {
|
|||
}
|
||||
|
||||
/**
|
||||
* $param string $title the title that should go in the <head> section of the HTML of this page.
|
||||
* @param string $title the title that should go in the <head> section of the HTML of this page.
|
||||
*/
|
||||
public function set_title($title) {
|
||||
$title = format_string($title);
|
||||
|
@ -714,12 +724,19 @@ class moodle_page {
|
|||
}
|
||||
|
||||
/**
|
||||
* $param string $heading the main heading that should be displayed at the top of the <body>.
|
||||
* @param string $heading the main heading that should be displayed at the top of the <body>.
|
||||
*/
|
||||
public function set_heading($heading) {
|
||||
$this->_heading = format_string($heading);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $menu The menu/content to show in the heading
|
||||
*/
|
||||
public function set_headingmenu($menu) {
|
||||
$this->_headingmenu = $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the course category this page belongs to manually. This automatically
|
||||
* sets $PAGE->course to be the site coures. You cannot use this method if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue