Add link to children pages from any page that is not included in a namespace

This commit is contained in:
vv221 2020-04-03 01:52:49 +02:00
parent b1725f934c
commit c1c8deef10

View file

@ -12,9 +12,12 @@ class MenuItem extends AbstractItem {
* @param string $label
*/
public function __construct(string $type, string $label) {
global $INFO;
$this->type = $type;
$this->label = $label;
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 = [];
}
}