xref: /dokuwiki/inc/Menu/Item/Admin.php (revision 33b91513e25639a6c7eb35668484d29098f7c9b4)
193b8c351SAndreas Gohr<?php
293b8c351SAndreas Gohr
393b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item;
493b8c351SAndreas Gohr
5368ce258SAndreas Gohr/**
6368ce258SAndreas Gohr * Class Admin
7368ce258SAndreas Gohr *
8368ce258SAndreas Gohr * Opens the Admin screen. Only shown to managers or above
9368ce258SAndreas Gohr */
10*33b91513SAndreas Gohrclass Admin extends AbstractItem
11*33b91513SAndreas Gohr{
1293b8c351SAndreas Gohr
1393b8c351SAndreas Gohr    /** @inheritdoc */
14*33b91513SAndreas Gohr    public function __construct()
15*33b91513SAndreas Gohr    {
1693b8c351SAndreas Gohr        parent::__construct();
1793b8c351SAndreas Gohr
184bb2fc4aSAndreas Gohr        $this->svg = DOKU_INC . 'lib/images/menu/settings.svg';
1993b8c351SAndreas Gohr    }
203d90b12cSAndreas Gohr
213d90b12cSAndreas Gohr    /** @inheritdoc */
223d90b12cSAndreas Gohr    public function visibleInContext($ctx)
233d90b12cSAndreas Gohr    {
243d90b12cSAndreas Gohr        global $INFO;
253d90b12cSAndreas Gohr        if (!$INFO['ismanager']) return false;
263d90b12cSAndreas Gohr
273d90b12cSAndreas Gohr        return parent::visibleInContext($ctx);
2893b8c351SAndreas Gohr    }
2993b8c351SAndreas Gohr
3093b8c351SAndreas Gohr}
31