当前位置: 首页>>代码示例>>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;未经允许,请勿转载。