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 */ 1133b91513SAndreas Gohrclass Back extends AbstractItem 1233b91513SAndreas Gohr{ 1393b8c351SAndreas Gohr /** @inheritdoc */ 1433b91513SAndreas Gohr public function __construct() 1533b91513SAndreas Gohr { 1693b8c351SAndreas Gohr global $ID; 1793b8c351SAndreas Gohr parent::__construct(); 1893b8c351SAndreas Gohr 1993b8c351SAndreas Gohr $parent = tpl_getparent($ID); 2093b8c351SAndreas Gohr if (!$parent) { 2193b8c351SAndreas Gohr throw new \RuntimeException("No parent for back action"); 2293b8c351SAndreas Gohr } 2393b8c351SAndreas Gohr 2493b8c351SAndreas Gohr $this->id = $parent; 2533b91513SAndreas Gohr $this->params = ['do' => '']; 2693b8c351SAndreas Gohr $this->accesskey = 'b'; 27*e44b94a4SAndreas Gohr $this->svg = DOKU_INC . 'lib/images/menu/12-back_arrow-left.svg'; 2893b8c351SAndreas Gohr } 2993b8c351SAndreas Gohr} 30