本文整理汇总了PHP中ca_occurrences::get方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_occurrences::get方法的具体用法?PHP ca_occurrences::get怎么用?PHP ca_occurrences::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_occurrences
的用法示例。
在下文中一共展示了ca_occurrences::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadTypeSpecificValueFromRow
public function loadTypeSpecificValueFromRow($pa_value_array)
{
$this->opn_occurrence_id = $pa_value_array['value_integer1'];
require_once __CA_MODELS_DIR__ . '/ca_occurrences.php';
$t_occ = new ca_occurrences($this->opn_occurrence_id);
$this->ops_text = $t_occ->getLabelForDisplay() . ($t_occ->get("idno") ? " [" . $t_occ->get("idno") . "]" : "");
}
示例2: Index
public function Index()
{
$t_occurrence = new ca_occurrences();
if ($this->request->config->get("dont_enforce_access_settings")) {
$va_access_values = array();
} else {
$va_access_values = caGetUserAccessValues($this->request);
}
# --- get the most viewed occ records
$va_occ_info = array();
$va_most_viewed_occs = $t_occurrence->getMostViewedItems(3, array('checkAccess' => $va_access_values));
foreach ($va_most_viewed_occs as $vn_occurrence_id => $va_occ_info) {
$t_occurrence->load($vn_occurrence_id);
$va_occ_info['title'] = $t_occurrence->getLabelForDisplay();
$va_preview_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "widepreview", "showMediaInfo" => false, "returnAsArray" => true));
if (sizeof($va_preview_stills) > 0) {
$va_occ_info["mediaPreview"] = array_shift($va_preview_stills);
}
$va_medium_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "medium", "showMediaInfo" => false, "returnAsArray" => true));
if (sizeof($va_medium_stills) > 0) {
$va_occ_info["mediaMedium"] = array_shift($va_medium_stills);
}
$va_occ_info["repository"] = $t_occurrence->get("CLIR2_institution", array('convertCodesToDisplayText' => true));
$va_most_viewed_occs[$vn_occurrence_id] = $va_occ_info;
}
$this->view->setVar('most_viewed_occs', $va_most_viewed_occs);
$this->render('Engage/engage_index_html.php');
}
示例3: caDownloadAttributeMedia
function caDownloadAttributeMedia($po_request, $po_response, $pn_occurrence_id, $ps_version, $pa_options = null)
{
$o_view = new View($po_request, $po_request->getViewsDirectoryPath() . '/bundles/');
$t_occurrence = new ca_occurrences($pn_occurrence_id);
if (!$t_occurrence->getPrimaryKey()) {
return null;
}
$vs_path = $t_occurrence->get('ca_occurrences.report_file', array('version' => $ps_version, 'return' => 'path'));
$vs_path_ext = pathinfo($vs_path, PATHINFO_EXTENSION);
if (!($vs_title = trim($t_occurrence->get('ca_occurrences.preferred_labels.name')))) {
$vs_title = "report";
}
$vs_name = _t(preg_replace('![^A-Za-z0-9\\,\\/\\?\\"\']+!', '_', $vs_title) . ".{$vs_path_ext}");
$o_view->setVar('file_path', $vs_path);
$o_view->setVar('file_name', $vs_name);
// send download
return $o_view->render('ca_attributes_download_media.php');
}
示例4: array
$va_exhibition_ids = array_keys(is_array($va_tmp = $t_set->getItemRowIDs(array('checkAccess' => $va_access_values, 'shuffle' => 1))) ? $va_tmp : array());
$t_exhibition->load($va_exhibition_ids[0]);
}
# --- check to see if there is an image set configured
if ($this->getVar("featured_set_id")) {
$qr_res = $this->getVar('featured_set_items_as_search_result');
if ($qr_res && $qr_res->numHits()) {
while ($qr_res->nextHit()) {
if ($vs_media = $qr_res->getWithTemplate('^ca_object_representations.media.front', array("checkAccess" => $va_access_values))) {
print "<div class='col-sm-12'><div class='frontSlide'>" . $vs_media . "</div></div>";
break;
}
}
}
} else {
if ($t_exhibition->get("occurrence_id")) {
# --- use the featured image from the show
$va_objects = $t_exhibition->get('ca_objects', array("checkAccess" => $va_access_values, "restrictToRelationshipTypes" => array("used_website"), "returnAsArray" => true));
if (is_array($va_objects) && sizeof($va_objects)) {
$va_object = array_pop($va_objects);
$t_object = new ca_objects($va_object["object_id"]);
print "<div class='col-sm-12'><div class='frontSlide'>" . caDetailLink($this->request, $t_object->get("ca_object_representations.media.front", array("checkAccess" => $va_access_values)), '', 'ca_occurrences', $t_exhibition->get("occurrence_id"), null, null, array("type_id" => $t_exhibition->get("ca_occurrences.type_id"))) . "</div></div>";
}
}
}
?>
<div class="col-sm-12">
<?php
if ($t_exhibition->get("occurrence_id")) {
print "<h1>" . caDetailLink($this->request, $t_exhibition->get("ca_occurrences.preferred_labels.name"), '', 'ca_occurrences', $t_exhibition->get("ca_occurrences.occurrence_id"), null, null, array("type_id" => $t_exhibition->get("ca_occurrences.type_id"))) . "</h1>";
示例5: getOccurrenceMediaOverlay
/**
* Returns content for overlay containing details for object representation linked to occurrence
*/
public function getOccurrenceMediaOverlay()
{
$pn_occurrence_id = $this->request->getParameter('occurrence_id', pInteger);
$pn_object_id = $this->request->getParameter('object_id', pInteger);
$this->view->setVar('object_id', $pn_object_id);
$pn_representation_id = $this->request->getParameter('representation_id', pInteger);
$this->view->setVar('occurrence_id', $pn_occurrence_id);
$t_occurrence = new ca_occurrences($pn_occurrence_id);
$this->view->setVar('object_id', $pn_object_id);
$t_object = new ca_objects($pn_object_id);
$this->view->setVar('t_object', $t_object);
$t_rep = new ca_object_representations($pn_representation_id);
$this->view->setVar('representation_id', $pn_representation_id);
$this->view->setVar('t_object_representation', $t_rep);
if ($this->request->config->get("dont_enforce_access_settings")) {
$va_access_values = array();
} else {
$va_access_values = caGetUserAccessValues($this->request);
}
if (!$t_occurrence->getPrimaryKey()) {
die("Invalid occurrence_id");
}
if (!$t_object->getPrimaryKey()) {
die("Invalid object_id");
}
if (!$t_rep->getPrimaryKey()) {
die("Invalid representation_id");
}
if (sizeof($va_access_values) && !in_array($t_occurrence->get('access'), $va_access_values)) {
die("Invalid occurrence_id");
}
if (sizeof($va_access_values) && !in_array($t_object->get('access'), $va_access_values)) {
die("Invalid object_id");
}
if (sizeof($va_access_values) && !in_array($t_rep->get('access'), $va_access_values)) {
die("Invalid rep_id");
}
// Get media for display using configured rules
$va_rep_display_info = caGetMediaDisplayInfo("media_overlay", $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
// set version
$this->view->setVar('version', $va_rep_display_info['display_version']);
unset($va_display_info['display_version']);
// set poster frame URL
//$va_rep_display_info['poster_frame_url'] = $t_rep->getMediaUrl('media', $va_rep_display_info['poster_frame_version']);
//unset($va_display_info['poster_frame_version']);
//$va_rep_display_info['viewer_base_url'] = $t_rep->getAppConfig()->get('ca_url_root');
// set other options
$this->view->setVar('display_options', $va_rep_display_info);
if (!($ps_display_type = trim($this->request->getParameter('display_type', pString)))) {
$ps_display_type = 'media_overlay';
}
if (!($ps_containerID = trim($this->request->getParameter('containerID', pString)))) {
$ps_containerID = 'caMediaPanelContentArea';
}
$this->view->setVar("display_type", $ps_display_type);
$this->view->setVar("containerID", $ps_containerID);
// Get all objects asscoiated with this occurrence and show primary reps as icons for navigation
$va_exhibition_images = $t_occurrence->get("ca_objects", array('restrict_to_relationship_types' => array('describes'), "returnAsArray" => 1, 'checkAccess' => $va_access_values));
if (sizeof($va_exhibition_images) > 0) {
$t_image_objects = new ca_objects();
$i = 1;
foreach ($va_exhibition_images as $vn_rel_id => $va_info) {
$t_image_objects->load($va_info["object_id"]);
if ($t_primary_rep = $t_image_objects->getPrimaryRepresentationInstance()) {
$va_temp = array();
if (!sizeof($va_access_values) || in_array($t_primary_rep->get('access'), $va_access_values)) {
$va_temp["representation_id"] = $t_primary_rep->get("representation_id");
$va_temp["rep_icon"] = $t_primary_rep->getMediaTag('media', 'icon');
$va_temp["rep_tinyicon"] = $t_primary_rep->getMediaTag('media', 'tinyicon');
$va_temp["object_id"] = $va_info["object_id"];
$va_thumbnails[$va_info["object_id"]] = $va_temp;
if ($vn_getNext == 1) {
$this->view->setVar("next_object_id", $va_info["object_id"]);
$this->view->setVar("next_representation_id", $t_primary_rep->get("representation_id"));
$vn_getNext = 0;
}
if ($va_info["object_id"] == $pn_object_id) {
$this->view->setVar("representation_index", $i);
$this->view->setVar("previous_object_id", $vn_prev_obj_id);
$this->view->setVar("previous_representation_id", $vn_prev_rep_id);
$vn_getNext = 1;
}
$vn_prev_obj_id = $va_info["object_id"];
$vn_prev_rep_id = $t_primary_rep->get("representation_id");
$i++;
}
}
}
}
$this->view->setVar('reps', $va_thumbnails);
return $this->render("Detail/ajax_ca_occurrences_media_overlay_html.php");
}
示例6: strtolower
*
* This source code is free and modifiable under the terms of
* GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
* the "license.txt" file for details, or visit the CollectiveAccess web site at
* http://www.CollectiveAccess.org
*
* ----------------------------------------------------------------------
*/
# --- session vars for persistent browse filters
$pn_user_category = $this->request->getParameter('user_category', pInteger);
if ($pn_user_category && $pn_user_category != $this->request->session->getVar("bokUserCategory")) {
$this->request->session->setVar("bokUserCategory", $pn_user_category);
require_once __CA_MODELS_DIR__ . "/ca_occurrences.php";
$t_occurrence = new ca_occurrences();
$t_occurrence->load($pn_user_category);
$this->request->session->setVar("bokUserCategoryLabel", strtolower($t_occurrence->get("ca_occurrences.preferred_labels.name")));
$this->request->session->setVar("bokUserCategoryIdno", strtolower($t_occurrence->get("ca_occurrences.idno")));
}
$pn_user_category = $this->request->session->getVar("bokUserCategory");
$ps_user_category = $this->request->session->getVar("bokUserCategoryLabel");
$ps_user_category_idno = $this->request->session->getVar("bokUserCategoryIdno");
# --- collect the user links - they are output twice - once for toggle menu and once for nav
$vs_user_links = "";
if ($this->request->isLoggedIn()) {
$vs_user_links .= '<li role="presentation" class="dropdown-header">' . trim($this->request->user->get("fname") . " " . $this->request->user->get("lname")) . ', ' . $this->request->user->get("email") . '</li>';
$vs_user_links .= '<li class="divider nav-divider"></li>';
$vs_user_links .= "<li>" . caNavLink($this->request, _t('Lightbox'), '', '', 'Sets', 'Index', array()) . "</li>";
$vs_user_links .= "<li>" . caNavLink($this->request, _t('Logout'), '', '', 'LoginReg', 'Logout', array()) . "</li>";
} else {
$vs_user_links .= "<li><a href='#' onclick='caMediaPanel.showPanel(\"" . caNavUrl($this->request, '', 'LoginReg', 'LoginForm', array()) . "\"); return false;' >" . _t("Login") . "</a></li>";
$vs_user_links .= "<li><a href='#' onclick='caMediaPanel.showPanel(\"" . caNavUrl($this->request, '', 'LoginReg', 'RegisterForm', array()) . "\"); return false;' >" . _t("Register") . "</a></li>";
示例7: array
if (trim($t_occurrence->get("ca_occurrences.internal_notes"))) {
print "<H3>Comments</H3><div class='unit'>";
print $t_occurrence->get("ca_occurrences.internal_notes", null, array('convertLinkBreaks' => true));
print "</div><!-- end unit -->";
}
# --- occurrences
$va_occurrences = $t_occurrence->get("ca_occurrences", array("returnAsArray" => 1, 'checkAccess' => $va_access_values, 'sort' => array('ca_occurrences.date.parsed_date')));
$va_sorted_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']);
$vs_venue = "";
$va_venues = array();
$va_venues = $t_occ->get('ca_entities', array('restrict_to_relationship_types' => array('primary_venue'), "returnAsArray" => 1, 'checkAccess' => $va_access_values));
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_sorted_occurrences[$va_occurrence['item_type_id']][$va_occurrence['occurrence_id']] = array("label" => $va_occurrence['label'], "date" => $t_occ->get("ca_occurrences.date.display_date"), "year_published" => $t_occ->get("ca_occurrences.bib_year_published"), "venue" => $vs_venue, "relationship_type_id" => $va_occurrence['relationship_type_id'], "bib_full_citation" => $t_occ->get("ca_occurrences.bib_full_citation"));
}
$va_occ_rel_types = $t_rel_types->getRelationshipInfo('ca_objects_x_occurrences');
foreach ($va_sorted_occurrences as $vn_occurrence_type_id => $va_occurrence_list) {
switch ($va_item_types[$vn_occurrence_type_id]['idno']) {
case "bibliography":
$vs_title = "Related Text";
break;
示例8: array
}
if ($vs_thumb) {
print "</div></div><!-- end row -->";
} else {
print "<br/>";
}
print "<br/>";
}
}
$va_occurrences = $t_item->get("ca_occurrences", array("returnAsArray" => true, "checkAccess" => $va_access_values));
if (sizeof($va_occurrences)) {
print "<H6>Related event" . (sizeof($va_occurrences) > 1 ? "s" : "") . "</H6>";
$t_rel_occurrence = new ca_occurrences();
foreach ($va_occurrences as $va_occurrence) {
$t_rel_occurrence->load($va_occurrence["occurrence_id"]);
$t_object_thumb->load($t_rel_occurrence->get("ca_objects.object_id", array("restrictToRelationshipTypes" => array("cover"), "checkAccess" => $va_access_values)));
$vs_thumb = $t_object_thumb->get("ca_object_representations.media.icon", array("checkAccess" => $va_access_values));
if ($vs_thumb) {
print "<div class='row'><div class='col-sm-3 col-md-3 col-lg-3'>" . $vs_thumb . "</div>\n";
print "<div class='col-sm-9 col-md-9 col-lg-9'>\n";
}
print $t_rel_occurrence->getWithTemplate("<b><l>^ca_occurrences.preferred_labels.name</l></b>");
if ($vs_brief_description = $t_rel_occurrence->get("ca_occurrences.brief_description")) {
print "<br/>" . $vs_brief_description;
}
if ($vs_thumb) {
print "</div></div><!-- end row -->";
} else {
print "<br/>";
}
print "<br/>";
示例9: foreach
}
print "</div></div>";
print "</div><!-- blockResults-->";
print "</div><!-- blockTitle-->";
print "</div><!-- occurrencesBlock-->";
}
# Related Events Block
if (sizeof($va_events) > 0) {
print "<div id='eventsBlock'>";
print "<div class='blockTitle related'>" . _t('Related Events') . "</div>";
print "<div class='blockResults scrollBlock'>";
print "<div class='scrollingDiv'><div class='scrollingDivContent'>";
foreach ($va_events as $occurrence_id => $va_event) {
$vn_occurrence_id = $va_event['occurrence_id'];
$t_occurrence = new ca_occurrences($vn_occurrence_id);
$va_objects = $t_occurrence->get('ca_objects.object_id', array('returnAsArray' => true));
$va_object_reps = caGetPrimaryRepresentationsForIDs($va_objects, array('versions' => array('resultthumb'), 'return' => array('tags')));
print "<div class='occurrencesResult'>";
print "<div class='exImage' {$vs_style}>" . $va_object_reps[0] . "</div>";
print "<div class='exTitle'>" . caNavLink($this->request, $va_event['name'], '', '', 'Detail', 'Occurrences/' . $va_event['occurrence_id']) . "</div>";
print "<div class='exDate'>" . $t_occurrence->get('ca_occurrences.event_dates') . "</div>";
print "</div><!-- end occurrenceResult -->";
}
print "</div></div>";
print "</div><!-- end blockResults -->";
print "</div><!-- end entitiesBlock -->";
}
# Related Entities Block
if (sizeof($va_entities) > 0) {
print "<div id='entitiesBlock'>";
print "<div class='blockTitle related'>" . _t('Related People') . "</div>";
示例10: _getActionsCollection
/**
*
*/
private function _getActionsCollection($pn_collection_id, $pn_start = 0, $pn_num_actions = 10)
{
$o_search = new OccurrenceSearch();
$o_search->setTypeRestrictions(array($this->opn_context_type_id, $this->opn_action_type_id));
$o_search->addResultFilter("ca_occurrences.access", "IN", join(',', $this->opa_access_values));
$qr_res = $o_search->search("ca_collections.collection_id:{$pn_collection_id}", array('sort' => 'ca_occurrences.date.dates_value', 'sort_direction' => 'asc'));
$qr_res->seek($pn_start);
$va_actions = array();
$vn_c = 0;
$t_occ = new ca_occurrences();
while ($qr_res->nextHit()) {
if (!($vs_date = trim($qr_res->get('ca_occurrences.date.dates_value', array('dateFormat' => 'delimited'))))) {
continue;
}
if ($vs_date == 'present') {
continue;
}
$va_silos = array();
$va_projects = array();
$t_occ->load($qr_res->get('ca_occurrences.occurrence_id'));
$va_silos = $t_occ->get("ca_collections", array("restrictToTypes" => array("silo"), "returnAsArray" => 1, 'checkAccess' => $this->opa_access_values));
# --- format silo icons here
$vs_silos = "";
if (is_array($va_silos) && sizeof($va_silos) > 0) {
$vs_silos = "<div class='actionSiloIcons'>";
foreach ($va_silos as $vn_i => $va_silo_info) {
$vs_bgColor = "";
switch ($va_silo_info["collection_id"]) {
case $this->request->config->get('silo_strawberry_flag'):
$vs_bgColor = $this->request->config->get('silo_strawberry_flag_bg');
break;
# --------------------------------------
# --------------------------------------
case $this->request->config->get('silo_silver_water'):
$vs_bgColor = $this->request->config->get('silo_silver_water_bg');
break;
# --------------------------------------
# --------------------------------------
default:
$vs_bgColor = "#000000";
break;
}
$vs_silos .= caNavLink($this->request, "<div class='actionSiloIcon siloIcon" . $va_silo_info["collection_id"] . "' style='background-color:" . $vs_bgColor . "'><!-- empty --></div>", '', 'Detail', 'Collection', 'Show', array('collection_id' => $va_silo_info["collection_id"]), array("title" => $va_silo_info["label"]));
}
$vs_silos .= "</div>";
}
$va_projects = $t_occ->get("ca_collections", array("restrictToTypes" => array("project"), "returnAsArray" => 1, 'checkAccess' => $this->opa_access_values));
$va_timestamps = array_shift($qr_res->get('ca_occurrences.date.dates_value', array('rawDate' => true, 'returnAsArray' => true)));
$va_actions[$vn_id = $qr_res->get('ca_occurrences.occurrence_id')] = array('occurrence_id' => $vn_id, 'label' => $qr_res->get('ca_occurrences.preferred_labels.name'), 'idno' => $qr_res->get('ca_occurrences.idno'), 'date' => $vs_date, 'timestamp' => $va_timestamps['start'], 'location' => $qr_res->get('ca_occurrences.georeference.geocode'), 'silos' => $va_silos, 'silos_formatted' => $vs_silos, 'projects' => $va_projects);
$vn_c++;
if ($vn_c >= $pn_num_actions) {
break;
}
}
return $va_actions;
}
示例11: foreach
if (sizeof($va_events) > 0) {
print "<div id='occurrencesBlock'>";
print "<div class='blockTitle related'>" . _t('Related Events') . "</div>";
print "<div class='blockResults scrollBlock'>";
print "<div class='scrollingDiv'><div class='scrollingDivContent'>";
$vn_i = 0;
foreach ($va_events as $event_id => $va_event) {
$vn_event_idno = $va_event['idno'];
$vn_event_id = $va_event['occurrence_id'];
$t_occurrence = new ca_occurrences($vn_event_id);
if ($vn_i == 0) {
print "<div class='eventSet'>";
}
print "<div class='eventsResult'>";
print "<div>" . caNavLink($this->request, $va_event['label'], '', '', 'Detail', 'Occurrences/' . $vn_event_id) . "</div>";
print "<div class='exDate'>" . $t_occurrence->get('ca_occurrences.event_dates') . "</div>";
print "</div>";
$vn_i++;
if ($vn_i == 5) {
print "</div>";
$vn_i = 0;
}
}
if (end($va_events) == $va_event && $vn_i < 5 && $vn_i != 0) {
print "</div>";
}
print "</div></div>";
print "</div><!-- end blockResults -->";
print "</div><!-- end occurrencesBlock-->";
}
# Related Objects Block
示例12: array
?>
</div><!-- end infoArea-->
</div><!-- end contentArea-->
<div id='relatedInfo'>
<?php
# Related Exhibitions Block
$va_occurrences = $t_item->get('ca_occurrences', array('restrictToTypes' => array('mf_exhibition'), 'returnAsArray' => true, 'checkAccess' => $va_access_values));
if (sizeof($va_occurrences) > 0) {
print "<div id='occurrencesBlock'>";
print "<div class='blockTitle related'>" . _t('Related Exhibitions') . "</div>";
print "<div class='blockResults exhibitions'>";
print "<div>";
foreach ($va_occurrences as $occurrence_id => $va_occurrence) {
$vn_occurrence_id = $va_occurrence['occurrence_id'];
$t_occurrence = new ca_occurrences($vn_occurrence_id);
$va_artworks = $t_occurrence->get('ca_collections.collection_id', array('returnAsArray' => true));
print "<div class='occurrencesResult'>";
$vn_ii = 0;
if (sizeof($va_artworks) >= 4) {
foreach ($va_artworks as $key => $vn_artwork_id) {
$t_collection = new ca_collections($vn_artwork_id);
$va_related_objects = $t_collection->get('ca_objects.object_id', array('returnAsArray' => true));
$va_object_reps = caGetPrimaryRepresentationsForIDs($va_related_objects, array('versions' => array('resultthumb'), 'return' => array('tags')));
if ($vn_ii % 2 == 0) {
$vs_style = "style='margin-right:10px;'";
} else {
$vs_style = "";
}
if ($va_primary_rep = array_shift(array_values($va_object_reps))) {
print "<div class='exImage' {$vs_style}>" . caNavLink($this->request, $va_primary_rep, '', '', 'Detail', 'Occurrences/' . $va_occurrence['occurrence_id']) . "</div>";
$vn_i++;
示例13: foreach
">
<name><![CDATA[<?php
print $t_set->getLabelForDisplay();
?>
]]></name>
<description><![CDATA[<?php
print $t_set->getAttributesForDisplay("description");
?>
]]></description>
</setInfo>
<setImages>
<?php
if (sizeof($va_items)) {
foreach ($va_items as $vn_item_id => $va_item) {
$t_occurrence->load($va_item[row_id]);
$va_image_urls = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "large", "return" => 'url', "returnAsArray" => true));
if (is_array($va_image_urls) && sizeof($va_image_urls) > 0) {
$vs_large_image = caEscapeForXML(array_shift($va_image_urls));
}
$vs_thumbnail_image = '';
$vs_maker = '';
$vs_credit = '';
$vs_title = caEscapeForXML($va_item['name']);
?>
<image large="<?php
print $vs_large_image;
?>
" thumbnail="<?php
print $vs_thumbnail_image;
?>
" title="<?php
示例14: while
$t_list = new ca_lists();
$vn_i = 0;
while ($vn_i < $vn_items_per_page && $vo_result->nextHit()) {
$vs_idno = $vo_result->get('ca_occurrences.idno');
$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');
$va_labels = $vo_result->getDisplayLabels($this->request);
print "<div" . ($vs_class ? " class='{$vs_class}'" : "") . " style='clear:both;'>";
$t_occurrence->load($vn_occurrence_id);
$vs_padding = 0;
$va_related_objects_links = $t_occurrence->get("ca_objects_x_occurrences.relation_id", array("returnAsArray" => true));
if (sizeof($va_related_objects_links)) {
$t_objects_x_occurrences = new ca_objects_x_occurrences();
foreach ($va_related_objects_links as $vn_relation_id) {
$t_objects_x_occurrences->load($vn_relation_id);
$va_reps = $t_objects_x_occurrences->get("ca_objects_x_occurrences.representation_list", array("returnAsArray" => true, 'idsOnly' => true));
if (is_array($va_reps)) {
foreach ($va_reps as $vn_relation_id => $va_attr) {
$t_rep = new ca_object_representations($va_attr['representation_list']);
$va_info = $t_rep->getMediaInfo("media");
$vs_padding = round($va_info["thumbnail"]["HEIGHT"] / 2) - 7;
print "<div class='occThumb'>" . $t_rep->getMediaTag('media', 'thumbnail') . "</div><!-- end occThumb -->";
break;
}
}
break;
示例15: foreach
</div>
<?php
}
}
?>
{{{<ifcount code="ca_occurrences.description" min="1"><span class='metaTitle'>Description</span><span class='meta'><unit>^ca_occurrences.description</unit></span></ifcount>}}}
{{{<ifcount relativeTo="ca_occurrences" code="ca_occurrences.locationText" min="1"><span class='metaTitle'>Location</span><span class='meta'><unit relativeTo="ca_occurrences">^ca_occurrences.locationText</unit></span></ifcount>}}}
{{{<ifcount relativeTo="ca_occurrences" code="ca_occurrences.legacyLocation" min="1"><span class='metaTitle'>Location (legacy text)</span><span class='meta'><unit relativeTo="ca_occurrences">^ca_occurrences.legacyLocation</unit></span></ifcount>}}}
<?php
if ($va_rel_works = $t_object->get('ca_occurrences.occurrence_id', array('returnAsArray' => true))) {
print "<span class='metaTitle'>Related places</span>";
print "<div class='meta'>";
foreach ($va_rel_works as $va_key => $va_occurrence_id) {
$t_occurrence = new ca_occurrences($va_occurrence_id);
print $t_occurrence->get('ca_places.preferred_labels');
}
print "</div>";
}
if (is_array($va_occurrence_ids = $t_object->get('ca_occurrences.occurrence_id', array('returnAsArray' => true)))) {
$qr_occ = caMakeSearchResult('ca_occurrences', $va_occurrence_ids);
while ($qr_occ->nextHit()) {
if (is_array($va_contributors = $qr_occ->get('ca_entities', array('restrictToRelationshipTypes' => array('subject', 'interviewee'), 'returnWithStructure' => true, 'checkAccess' => caGetUserAccessValues($this->request)))) && sizeof($va_contributors)) {
print "<div><span class='metaTitle'>Subjects</span><div class='meta'>";
foreach ($va_contributors as $cont_key => $va_contributor) {
print "<div>" . caNavLink($this->request, $va_contributor['displayname'] . " (" . $va_contributor['relationship_typename'] . ")", '', 'Detail', 'entities', $va_contributor['entity_id']) . "</div>";
}
print "</div></div>";
}
}
}