public function initMenuItems()
    {
        $this->Menu->area('headerLeft');

        $this->Menu->add('ca.user', [
            'title' => $this->authUser[Configure::read('CA.fields.username')],
            'url' => '#'
        ]);

        $this->Menu->add('ca.logout', [
            'parent' => 'ca.user',
            'title' => __d('CakeAdmin', 'Logout'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Users',
                'action' => 'logout',
            ]
        ]);

        $this->Menu->area('main');

        $this->Menu->add('ca.dashboard', [
            'title' => __d('CakeAdmin', 'Dashboard'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Dashboard',
                'action' => 'index',
            ],
            'weight' => 0,
        ]);

        $this->Menu->add('ca.settings', [
            'title' => __d('CakeAdmin', 'Settings'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Settings',
                'action' => 'index',
            ],
            'weight' => 50
        ]);

        foreach (Configure::read('CA.Menu.main') as $key => $value) {
            $this->Menu->add($key, $value);
        }
    }
public function initMenuItems()
    {
        $this->Menu->area('headerLeft');

        $this->Menu->add('ca.user', [
            'title' => $this->authUser[Configure::read('CA.fields.username')],
            'url' => '#'
        ]);

        $this->Menu->add('ca.logout', [
            'parent' => 'ca.user',
            'title' => __d('CakeAdmin', 'Logout'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Users',
                'action' => 'logout',
            ]
        ]);

        $this->Menu->area('main');

        $this->Menu->add('ca.dashboard', [
            'title' => __d('CakeAdmin', 'Dashboard'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Dashboard',
                'action' => 'index',
            ],
            'weight' => 0,
        ]);

        $this->Menu->add('ca.settings', [
            'title' => __d('CakeAdmin', 'Settings'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Settings',
                'action' => 'index',
            ],
            'weight' => 50
        ]);

        foreach (Configure::read('CA.Menu.main') as $key => $value) {
            $this->Menu->add($key, $value);
        }
    }
public function initMenuItems ( ) { $ this -> Menu -> area ( 'headerLeft' ) ; $ this -> Menu -> add ( 'ca.user' , [ 'title' => $ this -> authUser [ Configure :: read ( 'CA.fields.username' ) ] , 'url' => '#' ] ) ; $ this -> Menu -> add ( 'ca.logout' , [ 'parent' => 'ca.user' , 'title' => __d ( 'CakeAdmin' , 'Logout' ) , 'url' => [ 'prefix' => 'admin' , 'plugin' => 'CakeAdmin' , 'controller' => 'Users' , 'action' => 'logout' , ] ] ) ; $ this -> Menu -> area ( 'main' ) ; $ this -> Menu -> add ( 'ca.dashboard' , [ 'title' => __d ( 'CakeAdmin' , 'Dashboard' ) , 'url' => [ 'prefix' => 'admin' , 'plugin' => 'CakeAdmin' , 'controller' => 'Dashboard' , 'action' => 'index' , ] , 'weight' => 0 , ] ) ; $ this -> Menu -> add ( 'ca.settings' , [ 'title' => __d ( 'CakeAdmin' , 'Settings' ) , 'url' => [ 'prefix' => 'admin' , 'plugin' => 'CakeAdmin' , 'controller' => 'Settings' , 'action' => 'index' , ] , 'weight' => 50 ] ) ; foreach ( Configure :: read ( 'CA.Menu.main' ) as $ key => $ value ) { $ this -> Menu -> add ( $ key , $ value ) ; } }
Initializes all admin menu-items.

@return void
Initializes all admin menu - items .