public function updateModelConcepts(array $modelsArray, $action)
    {
        $data['models'] = [];

        foreach ($modelsArray as $modelId => $modelConcepts) {
            $model = [];
            $model['id'] = (string)$modelId;
            $model['output_info'] = [];
            $model['output_info']['data'] = [];
            $model['output_info']['data'] = $this->addModelConcepts($model['output_info']['data'], $modelConcepts);

            $data['models'][] = $model;
        }
        $data['action'] = $action;

        $updateResult = $this->getRequest()->request(
            'PATCH',
            $this->getRequestUrl('models'),
            $data
        );

        return $this->getModelsFromResult($updateResult);
    }
public function updateModelConcepts(array $modelsArray, $action)
    {
        $data['models'] = [];

        foreach ($modelsArray as $modelId => $modelConcepts) {
            $model = [];
            $model['id'] = (string)$modelId;
            $model['output_info'] = [];
            $model['output_info']['data'] = [];
            $model['output_info']['data'] = $this->addModelConcepts($model['output_info']['data'], $modelConcepts);

            $data['models'][] = $model;
        }
        $data['action'] = $action;

        $updateResult = $this->getRequest()->request(
            'PATCH',
            $this->getRequestUrl('models'),
            $data
        );

        return $this->getModelsFromResult($updateResult);
    }
public function updateModelConcepts ( array $ modelsArray , $ action ) { $ data [ 'models' ] = [ ] ; foreach ( $ modelsArray as $ modelId => $ modelConcepts ) { $ model = [ ] ; $ model [ 'id' ] = ( string ) $ modelId ; $ model [ 'output_info' ] = [ ] ; $ model [ 'output_info' ] [ 'data' ] = [ ] ; $ model [ 'output_info' ] [ 'data' ] = $ this -> addModelConcepts ( $ model [ 'output_info' ] [ 'data' ] , $ modelConcepts ) ; $ data [ 'models' ] [ ] = $ model ; } $ data [ 'action' ] = $ action ; $ updateResult = $ this -> getRequest ( ) -> request ( 'PATCH' , $ this -> getRequestUrl ( 'models' ) , $ data ) ; return $ this -> getModelsFromResult ( $ updateResult ) ; }
Common Model's Concepts Update Method

@param  array $modelsArray
@param $action

@return array
Common Model s Concepts Update Method