public function posts()
    {
        $links[] = [__d('me_cms', 'List posts'), [
            'controller' => 'Posts',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Add post'), [
            'controller' => 'Posts',
            'action' => 'add',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        //Only admins and managers can access these actions
        if ($this->Auth->isGroup(['admin', 'manager'])) {
            $links[] = [__d('me_cms', 'List categories'), [
                'controller' => 'PostsCategories',
                'action' => 'index',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
            $links[] = [__d('me_cms', 'Add category'), [
                'controller' => 'PostsCategories',
                'action' => 'add',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
        }

        $links[] = [__d('me_cms', 'List tags'), [
            'controller' => 'PostsTags',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, I18N_POSTS, ['icon' => 'far file-alt']];
    }
public function posts()
    {
        $links[] = [__d('me_cms', 'List posts'), [
            'controller' => 'Posts',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Add post'), [
            'controller' => 'Posts',
            'action' => 'add',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        //Only admins and managers can access these actions
        if ($this->Auth->isGroup(['admin', 'manager'])) {
            $links[] = [__d('me_cms', 'List categories'), [
                'controller' => 'PostsCategories',
                'action' => 'index',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
            $links[] = [__d('me_cms', 'Add category'), [
                'controller' => 'PostsCategories',
                'action' => 'add',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
        }

        $links[] = [__d('me_cms', 'List tags'), [
            'controller' => 'PostsTags',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, I18N_POSTS, ['icon' => 'far file-alt']];
    }
public function posts ( ) { $ links [ ] = [ __d ( 'me_cms' , 'List posts' ) , [ 'controller' => 'Posts' , 'action' => 'index' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; $ links [ ] = [ __d ( 'me_cms' , 'Add post' ) , [ 'controller' => 'Posts' , 'action' => 'add' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; //Only admins and managers can access these actions if ( $ this -> Auth -> isGroup ( [ 'admin' , 'manager' ] ) ) { $ links [ ] = [ __d ( 'me_cms' , 'List categories' ) , [ 'controller' => 'PostsCategories' , 'action' => 'index' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; $ links [ ] = [ __d ( 'me_cms' , 'Add category' ) , [ 'controller' => 'PostsCategories' , 'action' => 'add' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; } $ links [ ] = [ __d ( 'me_cms' , 'List tags' ) , [ 'controller' => 'PostsTags' , 'action' => 'index' , 'plugin' => 'MeCms' , 'prefix' => ADMIN_PREFIX , ] ] ; return [ $ links , I18N_POSTS , [ 'icon' => 'far file-alt' ] ] ; }
Internal function to generate the menu for "posts" actions
@return mixed Array with links, title and title options
Internal function to generate the menu for posts actions