public function getJson() { $json = new AppKitExtJsonDocument(); if (!$this->programStatus->isApplicable() || $this->programStatus->config_dump_in_progress === '1') { $json->addMiscData('fromCache', true); $data = $this->retrieveData(); } else { $json->addMiscData('fromCache', false); $data = $this->getCombined(); $this->writeData($data); } $json->hasFieldBulk($data); $json->setData(array($data)); $json->setSuccess(true); return $json; }
public function getJson() { $json = new AppKitExtJsonDocument(); if (!$this->programStatus->isApplicable() || $this->programStatus->config_dump_in_progress === '1') { $data = $this->retrieveData(); $json->addMiscData('fromCache', true); } else { $data = array($this->getData(), $this->getDataForInstance()); $this->writeData($data); $json->addMiscData('fromCache', false); } foreach (array_keys($data[0][0]) as $f) { $json->hasField($f); } $json->setSuccess(true); $json->setData($data[0]); $json->setSortinfo('type'); $json->addMiscData('rowsInstanceStatus', $data[1]); return $json; }