本文整理匯總了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>";
}