本文整理汇总了PHP中ca_objects::getPrimaryRepresentationId方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_objects::getPrimaryRepresentationId方法的具体用法?PHP ca_objects::getPrimaryRepresentationId怎么用?PHP ca_objects::getPrimaryRepresentationId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_objects
的用法示例。
在下文中一共展示了ca_objects::getPrimaryRepresentationId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
?>
<div id="caSetsSlideshowContainer">
<h1><?php
print $t_set->getLabelForDisplay();
?>
</h1>
<div id="caSetsSlideshow">
<?php
if (is_array($va_items) && sizeof($va_items)) {
$i = 1;
$t_set_item = new ca_objects();
$t_rep = new ca_object_representations();
foreach ($va_items as $va_item) {
$t_set_item->load($va_item["row_id"]);
#print_r($va_item);
$t_rep->load($t_set_item->getPrimaryRepresentationId());
$vs_image = $t_rep->getMediaTag("media", $vs_version);
$va_media_info = $t_rep->getMediaInfo("media", $vs_version);
# --- pad the top to center vertically
if ($vn_public_display) {
$vn_height = 450;
} else {
$vn_height = 600;
}
$vn_top_padding = round(($vn_height - $va_media_info["HEIGHT"]) / 2) . "px";
print "<div><div style='width:" . $va_media_info["WIDTH"] . "px; margin: 0px auto 0px auto; position:relative;'>";
print "<div style='padding-top: " . $vn_top_padding . "'>" . caNavLink($this->request, $vs_image, "", "Detail", "Object", "Show", array("object_id" => $va_item["object_id"])) . "</div>";
print "<div class='caSetsSlideshowCaption'>(" . $i . "/" . sizeof($va_items) . ")</br>";
if ($t_rep->get("image_credit_line")) {
print "<i>" . $t_rep->get("image_credit_line") . "</i>";
}