/** * Execute full indexation * * @return void */ public function executeFull() { $storeIds = array_keys($this->storeManager->getStores()); /** @var IndexerHandler $saveHandler */ $saveHandler = $this->indexerHandlerFactory->create(['data' => $this->data]); foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]); $saveHandler->cleanIndex([$dimension]); $saveHandler->saveIndex([$dimension], $this->fullAction->rebuildStoreIndex($storeId)); } $this->fulltextResource->resetSearchResults(); $this->searchRequestConfig->reset(); }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = Full::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
* * @return array */ protected function getHeaders() { $factory = \NDB_Factory::singleton(); $db = $factory->Database(); // Get all fields from parameter_type "magically created by // neurodb", since those are the dicom headers. // There's a few headers that get magically created which // aren't header fields, so we manually exclude them. // Namely: // // md5hash, tarchiveMD5, image_comments, check_pic_filename, // jiv_path return $db->pselect("SELECT pt.Name as Header, Value\n FROM parameter_file pf \n JOIN parameter_type pt USING (ParameterTypeID)\n JOIN files f USING (FileID)\n JOIN session s ON (f.SessionID=s.ID)\n JOIN candidate c ON (s.CandID=c.CandID)\n WHERE c.Active='Y' AND s.Active='Y' AND c.CandID=:CID AND \n s.Visit_label=:VL AND f.File LIKE CONCAT('%', :Fname) \n AND pt.Description LIKE '%magically%'\n AND pt.Name NOT IN (\n 'md5hash',\n 'tarchiveMD5',\n 'image_comments',\n 'check_pic_filename',\n 'jiv_path'\n )\n ", array('CID' => $this->CandID, 'VL' => $this->VisitLabel, 'Fname' => $this->Filename)); } /** * Calculate the entity tag for this URL * * @return string */ public function calculateETag() { return null; } } if (isset($_REQUEST['PrintHeadersFull'])) { $obj = new Full($_SERVER['REQUEST_METHOD'], $_REQUEST['CandID'], $_REQUEST['VisitLabel'], $_REQUEST['Filename']); print $obj->toJSONString(); }