Add link to children pages from any page that is not included in a namespace
This commit is contained in:
parent
b1725f934c
commit
c1c8deef10
1 changed files with 4 additions and 1 deletions
|
@ -12,9 +12,12 @@ class MenuItem extends AbstractItem {
|
||||||
* @param string $label
|
* @param string $label
|
||||||
*/
|
*/
|
||||||
public function __construct(string $type, string $label) {
|
public function __construct(string $type, string $label) {
|
||||||
|
global $INFO;
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
$this->label = $label;
|
$this->label = $label;
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
trigger_error("generating a menu item for type \"$this->type\" not implemented in ".get_class($this), E_USER_WARNING);
|
// Edit the item to show a link to the requested children page
|
||||||
|
$this->id = $this->type.':'.$INFO['id'];
|
||||||
|
$this->params = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue