193b8c351SAndreas Gohr<?php 293b8c351SAndreas Gohr 393b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item; 493b8c351SAndreas Gohr 5368ce258SAndreas Gohr/** 6368ce258SAndreas Gohr * Class Back 7368ce258SAndreas Gohr * 8cf71061dSAndreas Gohr * Navigates back up one namepspace. This is currently not used in any menu. Templates 9cf71061dSAndreas Gohr * would need to add this item manually. 10368ce258SAndreas Gohr */ 11*33b91513SAndreas Gohrclass Back extends AbstractItem 12*33b91513SAndreas Gohr{ 1393b8c351SAndreas Gohr 1493b8c351SAndreas Gohr /** @inheritdoc */ 15*33b91513SAndreas Gohr public function __construct() 16*33b91513SAndreas Gohr { 1793b8c351SAndreas Gohr global $ID; 1893b8c351SAndreas Gohr parent::__construct(); 1993b8c351SAndreas Gohr 2093b8c351SAndreas Gohr $parent = tpl_getparent($ID); 2193b8c351SAndreas Gohr if (!$parent) { 2293b8c351SAndreas Gohr throw new \RuntimeException("No parent for back action"); 2393b8c351SAndreas Gohr } 2493b8c351SAndreas Gohr 2593b8c351SAndreas Gohr $this->id = $parent; 26*33b91513SAndreas Gohr $this->params = ['do' => '']; 2793b8c351SAndreas Gohr $this->accesskey = 'b'; 28cf71061dSAndreas Gohr $this->svg = DOKU_INC . 'lib/images/menu/12-back_arrow-left.svg'; 2993b8c351SAndreas Gohr } 3093b8c351SAndreas Gohr 3193b8c351SAndreas Gohr} 32