render ( 'search', array ( 'model' => $model, 'selectionLists' => $this->selectionLists, 'submitURL' => $this->submitURL ) ); } catch (\yii\base\ErrorException $e) { Yii::$app->mailer->compose() ->setFrom(Yii::$app->params ['noreplyMail']) ->setTo(Yii::$app->params['feedbackMail']) ->setSubject('Error occured') ->setTextBody($e) ->send(); return $this->render('site/error', ["name"=>"Oooops", "message"=>"Something went wrong.","exception"=>$e]); } } public function actionBold() { $att = Yii::$app->request->get (); foreach ( $att as $k => $v ) { if (! empty ( $k )) ExploreManager::getBOLDRecord ( $k ); } } public function actionGbif() { $att = Yii::$app->request->get (); foreach ( $att as $k => $v ) { if (! empty ( $k )) ExploreManager::getGBIFRecord ( $k ); } } public function actionNcbi() { $att = Yii::$app->request->get (); foreach ( $att as $k => $v ) { if (! empty ( $k )) ExploreManager::getNCBIRecord( $k ); } } public function actionTree($id, $name, $rank, $kingdom, $phylum, $classis, $ordo, $family, $genus,$institution) { $elts = Yii::$app->request->get (); // $connection = new \yii\db\Connection ( Yii::$app->db ); // $connection->open (); $x = ""; // the child rank $y = $rank; // the current rank for SOLR switch ($rank) { case "kingdom" : $x = $z = "phylum"; break; case "phylum" : $x = $z = "classis"; $z = "class"; break; case "class" : $x = "ordo"; $y = "classis"; $z = "order"; break; case "order" : $x = $z = "family"; $y = "ordo"; break; case "family" : $x = $z = "genus"; break; case "genus" : $x = "name"; $z = "species"; break; case "species" : $x = "name"; $z = "species"; break; default : $sep = "   "; break; } $config = SOLRQueryManager::getConfigColTree (); $queryTree = SOLRQueryManager::createSearchQuery ( $config ); $q = "parent_id:" . $id; $fq = null; // $fq="{!join from=parent_id to=taxonID fromIndex=colTree}"; $raw_responseTree = SOLRQueryManager::fillAndExecuteQuery ( $queryTree, $q, $fq, [ ], False ); $docsTree = $raw_responseTree->getDocuments (); // $tree = ""; echo $tree2; } private function getValue($value, $field) { $valuep = str_replace ( " ", "\ ", $value ); if ($value == "Not assigned") { $valuep = " ( " . $field . ":" . $valuep . " OR N/A OR null ) "; } else $valuep = $field . ':' . $valuep; return $valuep; } private function getSQLValue($value, $field) { if ($value == "Not assigned") { $value = " ( " . $field . "='" . $value . "' OR " . $field . "='N/A' OR " . $field . " is null ) "; } else $value = $field . "='" . $value . "'"; return $value; } }