1<?php
2
3namespace dokuwiki\Menu\Item;
4
5/**
6 * Class Back
7 *
8 * Navigates back up one namepspace. This is currently not used in any menu. Templates
9 * would need to add this item manually.
10 */
11class Back extends AbstractItem {
12
13    /** @inheritdoc */
14    public function __construct() {
15        global $ID;
16        parent::__construct();
17
18        $parent = tpl_getparent($ID);
19        if(!$parent) {
20            throw new \RuntimeException("No parent for back action");
21        }
22
23        $this->id = $parent;
24        $this->params = array('do' => '');
25        $this->accesskey = 'b';
26        $this->svg = DOKU_INC_COMPAT . 'lib/images/menu/12-back_arrow-left.svg';
27    }
28
29}
30