[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Menu/Item/ -> Back.php (source)

   1  <?php
   2  
   3  namespace 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   */
  11  class Back extends AbstractItem
  12  {
  13      /** @inheritdoc */
  14      public function __construct()
  15      {
  16          global $ID;
  17          parent::__construct();
  18  
  19          $parent = tpl_getparent($ID);
  20          if (!$parent) {
  21              throw new \RuntimeException("No parent for back action");
  22          }
  23  
  24          $this->id = $parent;
  25          $this->params = ['do' => ''];
  26          $this->accesskey = 'b';
  27          $this->svg = DOKU_INC . 'lib/images/menu/12-back_arrow-left.svg';
  28      }
  29  }