src/apis/CommonController.php
public function actionNgrestOrder()
    {
        $apiEndpoint = Yii::$app->request->getBodyParam('apiEndpoint');
        $sort = Yii::$app->request->getBodyParam('sort');
        $field = Yii::$app->request->getBodyParam('field');
        
        if ($sort == '-') {
            $sort = SORT_DESC;
        } else {
            $sort = SORT_ASC;
        }
        
        return Yii::$app->adminuser->identity->setting->set('ngrestorder.'.$apiEndpoint, ['sort' => $sort, 'field' => $field]);
    }
public function actionNgrestOrder()
    {
        $apiEndpoint = Yii::$app->request->getBodyParam('apiEndpoint');
        $sort = Yii::$app->request->getBodyParam('sort');
        $field = Yii::$app->request->getBodyParam('field');
        
        if ($sort == '-') {
            $sort = SORT_DESC;
        } else {
            $sort = SORT_ASC;
        }
        
        return Yii::$app->adminuser->identity->setting->set('ngrestorder.'.$apiEndpoint, ['sort' => $sort, 'field' => $field]);
    }
public function actionNgrestOrder ( ) { $ apiEndpoint = Yii :: $ app -> request -> getBodyParam ( 'apiEndpoint' ) ; $ sort = Yii :: $ app -> request -> getBodyParam ( 'sort' ) ; $ field = Yii :: $ app -> request -> getBodyParam ( 'field' ) ; if ( $ sort == '-' ) { $ sort = SORT_DESC ; } else { $ sort = SORT_ASC ; } return Yii :: $ app -> adminuser -> identity -> setting -> set ( 'ngrestorder.' . $ apiEndpoint , [ 'sort' => $ sort , 'field' => $ field ] ) ; }
Set the lastest ngrest curd list order direction in the User Settings.

@return boolean
Set the lastest ngrest curd list order direction in the User Settings .