public function createModelData(Model $model)
    {
        $data = [];

        if ($model->getId()) {
            $data['id'] = $model->getId();
        }
        if ($model->getName()) {
            $data['name'] = $model->getName();
        }
        if ($model->getConcepts()) {
            $data['output_info']['data'] = [];
            $data['output_info']['data'] = $this->addModelConcepts($data['output_info']['data'], $model->getConcepts());
        }
        $data['output_info']['output_config'] = $model->getOutputConfig();

        return $data;
    }
public function createModelData(Model $model)
    {
        $data = [];

        if ($model->getId()) {
            $data['id'] = $model->getId();
        }
        if ($model->getName()) {
            $data['name'] = $model->getName();
        }
        if ($model->getConcepts()) {
            $data['output_info']['data'] = [];
            $data['output_info']['data'] = $this->addModelConcepts($data['output_info']['data'], $model->getConcepts());
        }
        $data['output_info']['output_config'] = $model->getOutputConfig();

        return $data;
    }
public function createModelData ( Model $ model ) { $ data = [ ] ; if ( $ model -> getId ( ) ) { $ data [ 'id' ] = $ model -> getId ( ) ; } if ( $ model -> getName ( ) ) { $ data [ 'name' ] = $ model -> getName ( ) ; } if ( $ model -> getConcepts ( ) ) { $ data [ 'output_info' ] [ 'data' ] = [ ] ; $ data [ 'output_info' ] [ 'data' ] = $ this -> addModelConcepts ( $ data [ 'output_info' ] [ 'data' ] , $ model -> getConcepts ( ) ) ; } $ data [ 'output_info' ] [ 'output_config' ] = $ model -> getOutputConfig ( ) ; return $ data ; }
Create Model data for Request

@param Model $model

@return array
Create Model data for Request