/** * */ public function savecontenttofileAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout->disableLayout(); /** * save parameter */ $hash = $this->_request->getParam('hash', ''); $modelIri = $this->_request->getParam('modelIri', ''); $stringifiedContent = $this->_request->getParam('stringifiedContent', ''); $type = $this->_request->getParam('type', ''); $useObservations = $this->_request->getParam('useObservations', ''); // if type is data, than load observations before save content if ('data' == $type && 'false' == $useObservations) { // setup $model = new Erfurt_Rdf_Model($modelIri); $query = new DataCube_Query($model, $this->_titleHelperLimit, $this->_dimensionElementLimit); // decode content $content = json_decode($stringifiedContent, true); // load observations $content['retrievedObservations'] = $query->getObservations($content['selectedDS']['__cv_uri'], $content['selectedComponents']['dimensions']); $stringifiedContent = json_encode($content, JSON_FORCE_OBJECT); } // write given content to file $configuration = new CubeViz_ConfigurationLink($this->_owApp->selectedModel, $this->_titleHelperLimit, $this->_dimensionElementLimit); $configuration->write($stringifiedContent, $hash); // send back generated hash $this->_sendJSONResponse(null); }