当前位置: 首页>>代码示例>>PHP>>正文


PHP ca_occurrences::getAttributesForDisplay方法代码示例

本文整理汇总了PHP中ca_occurrences::getAttributesForDisplay方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_occurrences::getAttributesForDisplay方法的具体用法?PHP ca_occurrences::getAttributesForDisplay怎么用?PHP ca_occurrences::getAttributesForDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ca_occurrences的用法示例。


在下文中一共展示了ca_occurrences::getAttributesForDisplay方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

            ?>
</div>
<?php 
        }
        ?>
				</div><!-- end unit -->
<?php 
    }
    # --- occurrences
    $va_occurrences = array();
    if (sizeof($this->getVar('occurrences'))) {
        $t_occ = new ca_occurrences();
        $va_item_types = $t_occ->getTypeList();
        foreach ($this->getVar('occurrences') as $va_occurrence) {
            $t_occ->load($va_occurrence['occurrence_id']);
            $va_occurrences[$va_occurrence['item_type_id']][$va_occurrence['occurrence_id']] = array("label" => $va_occurrence['label'], "date" => $t_occ->getAttributesForDisplay("dates", '^dates_value'), "relationship_type_id" => $va_occurrence['relationship_type_id']);
        }
        $va_occ_rel_types = $t_rel_types->getRelationshipInfo('ca_places_x_occurrences');
        foreach ($va_occurrences as $vn_occurrence_type_id => $va_occurrence_list) {
            ?>
						<div class="unit"><H2><?php 
            print _t("Related") . " " . $va_item_types[$vn_occurrence_type_id]['name_singular'] . (sizeof($va_occurrence_list) > 1 ? "s" : "");
            ?>
</H2>
<?php 
            foreach ($va_occurrence_list as $vn_rel_occurrence_id => $va_info) {
                ?>
						<div><?php 
                print ($this->request->config->get('allow_detail_for_ca_occurrences') ? caNavLink($this->request, $va_info["label"], '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $vn_rel_occurrence_id)) : $va_info["label"]) . " (" . unicode_ucfirst($va_occ_rel_types[$va_info['relationship_type_id']]['typename']) . ")";
                ?>
</div>
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:ca_places_detail_html.php

示例2: foreach

    if (sizeof($this->getVar('occurrences'))) {
        $t_occ = new ca_occurrences();
        $va_item_types = $t_occ->getTypeList();
        foreach ($this->getVar('occurrences') as $va_occurrence) {
            $t_occ->load($va_occurrence['occurrence_id']);
            $vs_venue = "";
            $va_venues = array();
            $va_venues = $t_occ->getRelatedItemsForDisplay('ca_entities', array('restrict_to_relationship_types' => array('venue')));
            if (sizeof($va_venues) > 0) {
                $va_venue_name = array();
                foreach ($va_venues as $va_venue_info) {
                    $va_venue_name[] = $va_venue_info["displayname"];
                }
                $vs_venue = implode($va_venue_name, ", ");
            }
            $va_occurrences[$va_occurrence['item_type_id']][$va_occurrence['occurrence_id']] = array("label" => $va_occurrence['label'], "date" => $t_occ->getAttributesForDisplay("date", '^display_date'), "year_published" => $t_occ->getAttributesForDisplay("bib_year_published "), "venue" => $vs_venue, "relationship_type_id" => $va_occurrence['relationship_type_id'], "bib_full_citation" => $t_occ->getAttributesForDisplay("bib_full_citation"));
        }
        $va_occ_rel_types = $t_rel_types->getRelationshipInfo('ca_objects_x_occurrences');
        foreach ($va_occurrences as $vn_occurrence_type_id => $va_occurrence_list) {
            ?>
						<div class="unit"><H3><?php 
            print $va_item_types[$vn_occurrence_type_id]['name_singular'] . (sizeof($va_occurrence_list) > 1 ? "s" : "");
            ?>
</H3>
<?php 
            foreach ($va_occurrence_list as $vn_rel_occurrence_id => $va_info) {
                switch ($va_item_types[$vn_occurrence_type_id]['idno']) {
                    case "exhibition":
                        print "<div>- ";
                        print $this->request->config->get('allow_detail_for_ca_occurrences') ? caNavLink($this->request, "\"" . $va_info['label'] . "\"", '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $vn_rel_occurrence_id)) : "\"" . $va_info["label"] . "\"";
                        if ($va_info["venue"]) {
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:ca_occurrences_chronology_detail_html.php


注:本文中的ca_occurrences::getAttributesForDisplay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。