[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

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

   1  <?php
   2  
   3  namespace dokuwiki\Menu\Item;
   4  
   5  /**
   6   * Class Admin
   7   *
   8   * Opens the Admin screen. Only shown to managers or above
   9   */
  10  class Admin extends AbstractItem
  11  {
  12      /** @inheritdoc */
  13      public function __construct()
  14      {
  15          parent::__construct();
  16  
  17          $this->svg = DOKU_INC . 'lib/images/menu/settings.svg';
  18      }
  19  
  20      /** @inheritdoc */
  21      public function visibleInContext($ctx)
  22      {
  23          global $INFO;
  24          if (!$INFO['ismanager']) return false;
  25  
  26          return parent::visibleInContext($ctx);
  27      }
  28  }