本文整理汇总了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";
}
示例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
}