public function systems()
    {
        //Only admins and managers can access this controller
        if (!$this->Auth->isGroup(['admin', 'manager'])) {
            return;
        }

        $links[] = [__d('me_cms', 'Temporary files'), [
            'controller' => 'Systems',
            'action' => 'tmpViewer',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        //Only admins can manage logs
        if ($this->Auth->isGroup('admin')) {
            $links[] = [__d('me_cms', 'Log management'), [
                'controller' => 'Logs',
                'action' => 'index',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
        }

        $links[] = [__d('me_cms', 'System checkup'), [
            'controller' => 'Systems',
            'action' => 'checkup',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Media browser'), [
            'controller' => 'Systems',
            'action' => 'browser',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Changelogs'), [
            'controller' => 'Systems',
            'action' => 'changelogs',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, __d('me_cms', 'System'), ['icon' => 'wrench']];
    }
public function systems()
    {
        //Only admins and managers can access this controller
        if (!$this->Auth->isGroup(['admin', 'manager'])) {
            return;
        }

        $links[] = [__d('me_cms', 'Temporary files'), [
            'controller' => 'Systems',
            'action' => 'tmpViewer',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        //Only admins can manage logs
        if ($this->Auth->isGroup('admin')) {
            $links[] = [__d('me_cms', 'Log management'), [
                'controller' => 'Logs',
                'action' => 'index',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
        }

        $links[] = [__d('me_cms', 'System checkup'), [
            'controller' => 'Systems',
            'action' => 'checkup',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Media browser'), [
            'controller' => 'Systems',
            'action' => 'browser',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Changelogs'), [
            'controller' => 'Systems',
            'action' => 'changelogs',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, __d('me_cms', 'System'), ['icon' => 'wrench']];
    }
public function systems ( ) { //Only admins and managers can access this controller if ( ! $ this -> Auth -> isGroup ( [ 'admin' , 'manager' ] ) ) { return ; } $ links [ ] = [ __d ( 'me_cms' , 'Temporary files' ) , [ 'controller' => 'Systems' , 'action' => 'tmpViewer' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; //Only admins can manage logs if ( $ this -> Auth -> isGroup ( 'admin' ) ) { $ links [ ] = [ __d ( 'me_cms' , 'Log management' ) , [ 'controller' => 'Logs' , 'action' => 'index' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; } $ links [ ] = [ __d ( 'me_cms' , 'System checkup' ) , [ 'controller' => 'Systems' , 'action' => 'checkup' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; $ links [ ] = [ __d ( 'me_cms' , 'Media browser' ) , [ 'controller' => 'Systems' , 'action' => 'browser' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; $ links [ ] = [ __d ( 'me_cms' , 'Changelogs' ) , [ 'controller' => 'Systems' , 'action' => 'changelogs' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; return [ $ links , __d ( 'me_cms' , 'System' ) , [ 'icon' => 'wrench' ] ] ; }
Internal function to generate the menu for "systems" actions
@return mixed Array with links, title and title options
Internal function to generate the menu for systems actions