Admin.php 518 B

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