dokuwiki-plugin-childrenpages/MenuItem.php

24 lines
518 B
PHP
Raw Normal View History

<?php
namespace dokuwiki\plugin\childrenpages;
use dokuwiki\Menu\Item\AbstractItem;
class MenuItem extends AbstractItem {
/**
* Generate a menu item from a passed string
*
* @param string $type
* @param string $label
*/
public function __construct(string $type, string $label) {
global $INFO;
$this->type = $type;
$this->label = $label;
parent::__construct();
// Edit the item to show a link to the requested children page
$this->id = $this->type.':'.$INFO['id'];
$this->params = [];
}
}