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


PHP ca_objects::getMediaTag方法代码示例

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


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

示例1: array

    $vn_item_count = 0;
    $va_tooltips = array();
    $t_list = new ca_lists();
    $vn_i = 0;
    while ($vn_i < $vn_items_per_page && $vo_result->nextHit()) {
        $vs_dates = $vo_result->get('ca_occurrences.productionDate');
        $vs_class = "";
        $vn_item_count++;
        if ($vn_item_count == 2) {
            $vs_class = "resultBg";
            $vn_item_count = 0;
        }
        $vn_occurrence_id = $vo_result->get('ca_occurrences.occurrence_id');
        if ($depicts = $vo_result->get('ca_objects.object_id', array('restrictToRelationshipTypes' => array('depicts')))) {
            $object_id = $depicts;
        } else {
            $object_id = $vo_result->get('ca_objects.object_id');
        }
        $t_object = new ca_objects($object_id);
        $va_object_media = $t_object->getMediaTag('ca_object_representations.media', 'icon');
        $va_labels = $vo_result->getDisplayLabels($this->request);
        print "<div" . ($vs_class ? " class='{$vs_class}'" : "") . ">";
        print caNavLink($this->request, "<div class='resultIcon'>" . $va_object_media . "</div><div class='resultText'> " . join($va_labels, "; "), '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $vn_occurrence_id));
        if ($vs_dates) {
            print "<br/> " . $vs_dates;
        }
        print "</div></div>\n";
        $vn_i++;
    }
    print "</div>\n";
}
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:ca_occurrences_results_full_html.php

示例2: foreach

    if ($t_occurrence->get("description")) {
        print "<div id='productionDescription'>";
        print _t("Summary");
        print "<div id='productionDescriptionText'>" . $t_occurrence->get("description") . "</div>";
        print "</div><!-- end productionDescription -->";
    }
    ?>
		</div><!-- end rightCol -->
<?php 
    if (sizeof($va_featured_object)) {
        foreach ($va_featured_object as $va_featured_object_info) {
            $vn_featured_object_id = $va_featured_object_info["object_id"];
            break;
        }
        $t_object = new ca_objects($vn_featured_object_id);
        $vs_media = $t_object->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values));
        $ca_lists = new ca_lists();
        ?>
		<div id="leftCol">
<?php 
        print "<div id='featuredMedia'>" . $vs_media . "</div>";
        # --- get caption for object
        $vs_caption = $t_object->get("ca_objects.image_caption.image_caption_text");
        if (!$vs_caption) {
            $vs_caption = $t_object->getLabelForDisplay();
        }
        print "<br/>" . $vs_caption;
        ?>
		</div><!-- end leftCol -->
<?php 
    }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:ca_occurrences_detail_html.php


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