當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ca_occurrences::getLabelforDisplay方法代碼示例

本文整理匯總了PHP中ca_occurrences::getLabelforDisplay方法的典型用法代碼示例。如果您正苦於以下問題:PHP ca_occurrences::getLabelforDisplay方法的具體用法?PHP ca_occurrences::getLabelforDisplay怎麽用?PHP ca_occurrences::getLabelforDisplay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ca_occurrences的用法示例。


在下文中一共展示了ca_occurrences::getLabelforDisplay方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetAction

 /**
  *
  */
 public function GetAction()
 {
     $pn_action_id = $this->request->getParameter('action_id', pInteger);
     $pn_silo_id = $this->request->getParameter('silo_id', pInteger);
     $t_action = new ca_occurrences($pn_action_id);
     $va_action = array();
     $va_action["objects"] = $t_action->get('ca_objects', array("restrict_to_relationship_types" => array("display", "secondary"), "returnAsArray" => 1, 'checkAccess' => $this->opa_access_values));
     $va_action["label"] = $t_action->getLabelforDisplay();
     $va_action["georeference"] = $t_action->get('ca_occurrences.georeference.geocode');
     # --- get a bigger map if there are no objects to show
     if (is_array($va_action["objects"]) && sizeof($va_action["objects"]) > 0) {
         $o_map = new GeographicMap(250, 128, 'mapAction' . $pn_action_id . 'Silo' . $pn_silo_id);
     } else {
         $o_map = new GeographicMap(500, 300, 'mapAction' . $pn_action_id . 'Silo' . $pn_silo_id);
     }
     $o_map->mapFrom($t_action, "ca_occurrences.georeference.geocode");
     $vs_map = $o_map->render('HTML');
     $va_action["map"] = $vs_map;
     $va_action["description"] = $t_action->get('description');
     $va_action["occurrence_id"] = $t_action->get('occurrence_id');
     $va_action["entities"] = $t_action->get('ca_entities', array("returnAsArray" => 1, 'checkAccess' => $this->opa_access_values, 'sort' => 'surname'));
     $va_action["collections"] = $t_action->get('ca_collections', array("returnAsArray" => 1, 'checkAccess' => $this->opa_access_values));
     $va_action["occurrences"] = $t_action->get('ca_occurrences', array("returnAsArray" => 1, 'checkAccess' => $this->opa_access_values));
     $va_action["date"] = $t_action->get('date', array('template' => "^dates_value"));
     # --- get next and previous ids
     $o_cache = caGetCacheObject('MetabolicChronology', 3600);
     $va_silos = $o_cache->load('silo_list');
     $va_silo_actionmap = $va_silos[$pn_silo_id]['actionmap'];
     $pn_previous_id = "";
     $pn_next_id = "";
     foreach ($va_silo_actionmap as $i => $va_action_info) {
         if ($va_action_info["id"] == $pn_action_id) {
             $pn_previous_id = $va_silo_actionmap[$i - 1]["id"];
             $pn_next_id = $va_silo_actionmap[$i + 1]["id"];
             break;
         }
     }
     $this->view->setVar('previous_id', $pn_previous_id);
     $this->view->setVar('next_id', $pn_next_id);
     $this->view->setVar('action', $va_action);
     $this->view->setVar('silo_id', $pn_silo_id);
     $this->render('action_info_html.php');
 }
開發者ID:guaykuru,項目名稱:pawtucket,代碼行數:46,代碼來源:ShowController.php


注:本文中的ca_occurrences::getLabelforDisplay方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。