output MDLSITE-1070 Added set methods to custom_menu class as properties are protected

This commit is contained in:
Sam Hemelryk 2010-10-12 01:22:15 +00:00
parent 6d80fad4d4
commit f3827323e1

View file

@ -2194,6 +2194,30 @@ class custom_menu_item implements renderable {
public function has_children() {
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;
}
}
/**