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