本文整理汇总了PHP中ca_occurrences::load方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_occurrences::load方法的具体用法?PHP ca_occurrences::load怎么用?PHP ca_occurrences::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_occurrences
的用法示例。
在下文中一共展示了ca_occurrences::load方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
示例2: foreach
<?php
foreach ($va_entities as $va_entity) {
print "<div>" . ($this->request->config->get('allow_detail_for_ca_entities') ? caNavLink($this->request, $va_entity["label"], '', 'Detail', 'Entity', 'Show', array('entity_id' => $va_entity["entity_id"])) : $va_entity["label"]) . " (" . $va_entity['relationship_typename'] . ")</div>";
}
?>
</div><!-- end unit -->
<?php
}
# --- occurrences
$va_occurrences = $t_place->get("ca_occurrences", array("returnAsArray" => 1, 'checkAccess' => $va_access_values));
$va_sorted_occurrences = array();
if (sizeof($va_occurrences) > 0) {
$t_occ = new ca_occurrences();
$va_item_types = $t_occ->getTypeList();
foreach ($va_occurrences as $va_occurrence) {
$t_occ->load($va_occurrence['occurrence_id']);
$va_sorted_occurrences[$va_occurrence['item_type_id']][$va_occurrence['occurrence_id']] = $va_occurrence;
}
foreach ($va_sorted_occurrences as $vn_occurrence_type_id => $va_occurrence_list) {
?>
<div class="unit"><h2><?php
print _t("Related") . " " . $va_item_types[$vn_occurrence_type_id]['name_singular'] . (sizeof($va_occurrence_list) > 1 ? "s" : "");
?>
</h2>
<?php
foreach ($va_occurrence_list as $vn_rel_occurrence_id => $va_info) {
print "<div>" . ($this->request->config->get('allow_detail_for_ca_occurrences') ? caNavLink($this->request, $va_info["label"], '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $vn_rel_occurrence_id)) : $va_info["label"]) . " (" . $va_info['relationship_typename'] . ")</div>";
}
print "</div><!-- end unit -->";
}
}
示例3: foreach
print "<div class='unit'><b>" . _t('Type Status') . ":</b> " . $va_track_type_status . "</div>";
}
if ($vs_description = $t_object->get("ca_objects.description")) {
print "<div class='unit'><b>" . _t('Description') . ":</b> {$vs_description}</div><!-- end unit -->";
}
if ($va_photographs = $t_object->get('ca_objects.photographs', array('convertCodesToDisplayText' => true))) {
print "<div class='unit'><b>" . _t('Photographs') . ":</b> " . $va_photographs . "</div>";
}
}
#end if statement
if ($va_citations = $t_object->get('ca_occurrences', array('returnAsArray' => true, 'checkAccess' => $va_access_values))) {
if (sizeof($va_citations)) {
$t_occurrence = new ca_occurrences();
print "<br><div class='unit'><h2>" . (sizeof($va_citations) > 1 ? "Citations" : "Citation") . "</h2>";
foreach ($va_citations as $va_citation) {
$t_occurrence->load($va_citation["occurrence_id"]);
$vs_citation = "";
$vs_citation .= $t_occurrence->get("ca_entities.preferred_labels.displayname", array("restrict_to_relationship_types" => array("author"), "convertCodesToDisplayText" => true, "delimiter" => "; ")) . ". ";
$vs_citation .= "\"" . $va_citation["name"] . ".\" ";
if ($t_occurrence->get("ca_occurrences.journal")) {
$vs_citation .= "<i>" . $t_occurrence->get("ca_occurrences.journal") . "</i> ";
}
if ($t_occurrence->get("ca_occurrences.month_volume")) {
$vs_citation .= $t_occurrence->get("ca_occurrences.month_volume") . " ";
}
if ($t_occurrence->get("year")) {
$vs_citation .= "(" . $t_occurrence->get("year") . ") ";
}
if ($t_occurrence->get("ca_occurrences.pages")) {
$vs_citation .= ": " . $t_occurrence->get("ca_occurrences.pages");
}
示例4: array
print "<br/>" . $vs_brief_description;
}
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/>";
}
示例5: 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;
?>
示例6: _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;
}
示例7: jQuery
print "<div class='moreLink'><a href='#' id='eventsMoreLink' onclick='jQuery(\"#eventsMore\").slideDown(250); jQuery(\"#eventsMoreLink\").hide(); return false;'>" . ($q_events->numHits() - $vn_num_more_link) . _t(" More like this") . " ›</a></div>";
}
print "</div><!-- end unit -->";
}
# --- output exhibitions from the year
$qr_exhibitions = $va_years_info["exhibitions"];
if ($qr_exhibitions->numHits() > 0) {
print "<div class='unit'><div class='chronologyHeading'>" . _t("Exhibitions in %1", $vs_year_label) . "</div>";
$t_occ = new ca_occurrences();
$i = 0;
while ($qr_exhibitions->nextHit()) {
if ($i == $vn_num_more_link) {
print "<div id='exhibitionsMore' class='relatedMoreItems'>";
}
$vn_occurrence_id = $qr_exhibitions->get("ca_occurrences.occurrence_id");
$t_occ->load($vn_occurrence_id);
$va_labels = $qr_exhibitions->getDisplayLabels($this->request);
$vs_label = "\"" . join("; ", $va_labels) . ",\" ";
$vs_venue = "";
$va_venues = array();
$va_venues = $t_occ->get('ca_entities', array('returnAsArray' => 1, 'checkAccess' => $va_access_values, 'restrict_to_relationship_types' => array('primary_venue')));
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, ", ");
}
if ($vs_venue) {
$vs_label .= $vs_venue;
}
示例8: caGetFrontConfig
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License version 3
*
* ----------------------------------------------------------------------
*/
?>
<div class="row">
<?php
$va_access_values = $this->getVar("access_values");
$o_config = caGetFrontConfig();
# --- grab the set that has the featured
$t_set = new ca_sets();
$t_set->load(array('set_code' => $o_config->get("front_page_exhibit_set_code")));
$t_exhibition = new ca_occurrences();
if (sizeof($va_access_values) == 0 || sizeof($va_access_values) && in_array($t_set->get("access"), $va_access_values)) {
$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
示例9: array
</H1>
<div id="galleryLanding">
<div class="textContent">
<?php
if ($this->request->getController() == "Exhibits") {
print $this->render('Exhibits/intro_text_html.php');
} else {
print $this->render('Exhibits/your_sets_intro_text_html.php');
}
?>
</div>
<?php
$t_occurrence = new ca_occurrences();
foreach ($va_set_list as $vn_set_id => $va_set_info) {
$va_item = $va_first_items_from_sets[$vn_set_id][array_shift(array_keys($va_first_items_from_sets[$vn_set_id]))];
$t_occurrence->load($va_item['row_id']);
$va_preview_stills = array();
$vs_preview_still = "";
$va_medium_stills = array();
$vs_medium_still = "";
$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) {
$vs_preview_still = 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) {
$vs_medium_still = array_shift($va_medium_stills);
}
print "<div class='setInfo'>";
$va_item = $va_first_items_from_sets[$vn_set_id][array_shift(array_keys($va_first_items_from_sets[$vn_set_id]))];
print "<div class='setImage'>" . caNavLink($this->request, $vs_preview_still, '', 'clir2', $this->request->getController(), 'displaySet', array('set_id' => $vn_set_id)) . "</div><!-- end setImage -->";
示例10: array
</div><!-- end row -->
<?php
break;
# -------------------------------------------------------------------------------
# -------------------------------------------------------------------------------
case "exhibitions":
?>
<div class="row">
<div class="col-sm-7">
<?php
$va_exhibitions = $t_item->get("ca_occurrences", array("returnAsArray" => true, "checkAccess" => $va_access_values, "restrictToRelationshipTypes" => array("exhibited"), "sort" => array("ca_occurrences.opening_closing"), "sortDirection" => "desc"));
$t_occurrence = new ca_occurrences();
if (sizeof($va_exhibitions) > 0) {
foreach ($va_exhibitions as $va_exhibition) {
$t_occurrence->load($va_exhibition["occurrence_id"]);
print "<h2>" . caDetailLink($this->request, $t_occurrence->get("ca_occurrences.preferred_labels.name"), '', 'ca_occurrences', $va_exhibition["occurrence_id"], null, null, array("type_id" => $t_occurrence->get("ca_occurrences.type_id"))) . "</h2>";
print "<h2>" . $t_occurrence->get("ca_occurrences.exhibition_subtitle") . "</h2>";
print "<h4>" . $t_occurrence->get("ca_occurrences.opening_closing") . "</h4>";
print "<br/>";
}
} else {
print "<h2>No exhibitions</h2>";
}
?>
</div><!-- end col -->
<div class="col-sm-4 col-sm-offset-1">
{{{<ifcount code="ca_objects" min="1">
<unit relativeTo="ca_objects" delimiter=" " restrictToRelationshipTypes="creator_website">
<div class="thumbnail">^ca_object_representations.media.medium
<div class="caption">^ca_objects.caption</div>
示例11: switch
print "<div" . ($vs_class ? " class='{$vs_class}'" : "") . ">";
switch ($vo_result->get("ca_occurrences.type_id")) {
# ----------------
# --- bibliography
case $vn_bib_type_id:
print caNavLink($this->request, $vo_result->get('ca_occurrences.bib_full_citation'), '', 'Detail', 'Occurrence', 'Show', array('occurrence_id' => $vn_occurrence_id));
break;
# ----------------
# --- exhibitions
# ----------------
# --- exhibitions
case $vn_exhibition_type_id:
$vs_result = "";
$vs_result .= "\"" . join($va_labels, "; ") . ",\" ";
# --- get venue
$t_occ->load($vo_result->get('ca_occurrences.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, ", ");
}
if ($vs_venue) {
$vs_result .= $vs_venue;
}
if ($vo_result->get("ca_occurrences.date.display_date")) {
$vs_result .= ", " . $vo_result->get("ca_occurrences.date.display_date");
示例12: caNavLink
<?php
if ($pn_user_category = $this->request->getParameter('user_category', pInteger)) {
require_once __CA_MODELS_DIR__ . "/ca_occurrences.php";
$t_occurrence = new ca_occurrences();
$t_occurrence->load($pn_user_category);
$ps_user_category = strtolower($t_occurrence->get("ca_occurrences.preferred_labels.name"));
} else {
$pn_user_category = $this->request->session->getVar("bokUserCategory");
$ps_user_category = $this->request->session->getVar("bokUserCategoryLabel");
}
?>
<div class="container containerTextPadding" id="comp_content">
<div class="row">
<div class="col-sm-12">
<H2>Choose content within the <span class='capital'><?php
print $ps_user_category;
?>
</span> category below:</H2><br/>
</div>
</div>
<div class="row">
<div class="col-sm-5 col-sm-offset-1">
<table class="table">
<tr>
<td class="contentbox iconbox"><?php
print caNavLink($this->request, caGetThemeGraphic($this->request, 'button_content.png') . "<br />content", "", "", "Browse", "Content", array("facet" => "category_facet", "id" => $pn_user_category));
?>
</td>
<td class="compsec_info"><?php
print caNavLink($this->request, "Explore an e-learning platform for self-guided professional development based on competences.", "", "", "Browse", "Content", array("facet" => "category_facet", "id" => $pn_user_category));
示例13: foreach
<?php
if ($this->request->getController() == "Exhibits") {
print _t("More Exhibits");
} else {
print _t("More Collections");
}
?>
</H3>
<?php
foreach ($va_set_list as $vn_set_id => $va_set_info) {
if ($vn_set_id == $t_set->get("set_id")) {
continue;
}
print "<div class='setInfo'>";
$va_item = $va_first_items_from_sets[$vn_set_id][array_shift(array_keys($va_first_items_from_sets[$vn_set_id]))];
$t_occurrence->load($va_item["row_id"]);
$va_preview_stills = array();
$vs_preview_still = "";
$va_preview_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "icon", "showMediaInfo" => false, "returnAsArray" => true));
if (sizeof($va_preview_stills) > 0) {
$vs_preview_still = array_shift($va_preview_stills);
}
print "<div class='setImage'>" . caNavLink($this->request, $vs_preview_still, '', 'clir2', $this->request->getController(), 'displaySet', array('set_id' => $vn_set_id)) . "</div><!-- end setImage -->";
print "<div class='setTitle'>" . caNavLink($this->request, strlen($va_set_info["name"]) > 120 ? substr($va_set_info["name"], 0, 120) . "..." : $va_set_info["name"], '', 'clir2', $this->request->getController(), 'displaySet', array('set_id' => $vn_set_id)) . "</div>";
print "<div style='clear:left; height:1px;'><!-- empty --></div><!-- end clear --></div><!-- end setInfo -->";
}
?>
</div><!-- end allSets -->
<?php
}
# --- selected set info - descriptiona and grid of items with links to open panel with more info