mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
output MDLSITE-1070 Added set methods to custom_menu class as properties are protected
This commit is contained in:
parent
6d80fad4d4
commit
f3827323e1
1 changed files with 24 additions and 0 deletions
|
@ -2194,6 +2194,30 @@ class custom_menu_item implements renderable {
|
||||||
public function has_children() {
|
public function has_children() {
|
||||||
return (count($this->children) > 0);
|
return (count($this->children) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the text for the node
|
||||||
|
* @param string $text
|
||||||
|
*/
|
||||||
|
public function set_text($text) {
|
||||||
|
$this->text = (string)$text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the title for the node
|
||||||
|
* @param string $title
|
||||||
|
*/
|
||||||
|
public function set_title($title) {
|
||||||
|
$this->title = (string)$title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the url for the node
|
||||||
|
* @param moodle_url $url
|
||||||
|
*/
|
||||||
|
public function set_url(moodle_url $url) {
|
||||||
|
$this->url = $url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue