src/components/AdminMenuBuilder.php
public function itemApi($name, $route, $icon, $apiEndpoint, array $options = [])
    {
        $item = [
            'alias' => $name,
            'route' => $route,
            'icon' => $icon,
            'permissionApiEndpoint' => $apiEndpoint,
            'permissionIsRoute' => false,
            'permissionIsApi' => true,
            'searchModelClass' => false,
            'options' => $this->verifyOptions($options),
        ];

        $this->_menu[$this->_pointers['node']]['groups'][$this->_pointers['group']]['items'][] = $item;
    
        $this->_permissionApis[] = ['api' => $apiEndpoint, 'alias' => $name, 'pool' => $this->getOptionValue($item, 'pool', null)];
    
        return $this;
    }
public function itemApi($name, $route, $icon, $apiEndpoint, array $options = [])
    {
        $item = [
            'alias' => $name,
            'route' => $route,
            'icon' => $icon,
            'permissionApiEndpoint' => $apiEndpoint,
            'permissionIsRoute' => false,
            'permissionIsApi' => true,
            'searchModelClass' => false,
            'options' => $this->verifyOptions($options),
        ];

        $this->_menu[$this->_pointers['node']]['groups'][$this->_pointers['group']]['items'][] = $item;
    
        $this->_permissionApis[] = ['api' => $apiEndpoint, 'alias' => $name, 'pool' => $this->getOptionValue($item, 'pool', null)];
    
        return $this;
    }
public function itemApi ( $ name , $ route , $ icon , $ apiEndpoint , array $ options = [ ] ) { $ item = [ 'alias' => $ name , 'route' => $ route , 'icon' => $ icon , 'permissionApiEndpoint' => $ apiEndpoint , 'permissionIsRoute' => false , 'permissionIsApi' => true , 'searchModelClass' => false , 'options' => $ this -> verifyOptions ( $ options ) , ] ; $ this -> _menu [ $ this -> _pointers [ 'node' ] ] [ 'groups' ] [ $ this -> _pointers [ 'group' ] ] [ 'items' ] [ ] = $ item ; $ this -> _permissionApis [ ] = [ 'api' => $ apiEndpoint , 'alias' => $ name , 'pool' => $ this -> getOptionValue ( $ item , 'pool' , null ) ] ; return $ this ; }
Add an item to a group. API items are based on the ngrest crud concept.

@param string $name The name of the Api (displayed as menu point in the left navigation), all names run through the `Yii::t()` method prefixed with the module id.
@param string $route The api route to the ngrest controller `cmsadmin/navcontainer/index`.
@param string $icon The icon name based on the google icons font see https://design.google.com/icons/.
@param string $apiEndpoint The api endpoint defined in the NgRestModel::ngRestApiEndpoint `api-cms-navcontainer`.
@param array $options An array with options you can provided and read inside the admin menu component. See {{\luya\admin\components\AdminMenuBuilder::verifyOptions}} for detail list and informations.
@return \luya\admin\components\AdminMenuBuilder
Add an item to a group . API items are based on the ngrest crud concept .