Back.php 666 B

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