src/ngrest/base/Plugin.php
public function createCrudLoaderTag($ngrestModelClass, $ngRestModelSelectMode = null, array $options = [])
    {
        $menu = Yii::$app->adminmenu->getApiDetail($ngrestModelClass::ngRestApiEndpoint(), Yii::$app->request->get('pool'));
        
        if ($menu) {
            if ($ngRestModelSelectMode) {
                $options['model-setter'] = $ngRestModelSelectMode;
                $options['model-selection'] = 1;
            } else {
                $options['model-selection'] = 0;
            }
            
            return $this->createTag('crud-loader', null, array_merge(['api' => $menu['route'], 'alias' => $menu['alias']], $options));
        }
        
        return null;
    }
public function createCrudLoaderTag($ngrestModelClass, $ngRestModelSelectMode = null, array $options = [])
    {
        $menu = Yii::$app->adminmenu->getApiDetail($ngrestModelClass::ngRestApiEndpoint(), Yii::$app->request->get('pool'));
        
        if ($menu) {
            if ($ngRestModelSelectMode) {
                $options['model-setter'] = $ngRestModelSelectMode;
                $options['model-selection'] = 1;
            } else {
                $options['model-selection'] = 0;
            }
            
            return $this->createTag('crud-loader', null, array_merge(['api' => $menu['route'], 'alias' => $menu['alias']], $options));
        }
        
        return null;
    }
public function createCrudLoaderTag ( $ ngrestModelClass , $ ngRestModelSelectMode = null , array $ options = [ ] ) { $ menu = Yii :: $ app -> adminmenu -> getApiDetail ( $ ngrestModelClass :: ngRestApiEndpoint ( ) , Yii :: $ app -> request -> get ( 'pool' ) ) ; if ( $ menu ) { if ( $ ngRestModelSelectMode ) { $ options [ 'model-setter' ] = $ ngRestModelSelectMode ; $ options [ 'model-selection' ] = 1 ; } else { $ options [ 'model-selection' ] = 0 ; } return $ this -> createTag ( 'crud-loader' , null , array_merge ( [ 'api' => $ menu [ 'route' ] , 'alias' => $ menu [ 'alias' ] ] , $ options ) ) ; } return null ; }
Create a tag for relation window toggler with directive crudLoader based on a ngrest model class.

@param string $ngrestModelClass
@return string The generated tag or null if permission does not exists
Create a tag for relation window toggler with directive crudLoader based on a ngrest model class .