function Detail() { JavascriptLoadManager::register('panel'); if ($this->request->config->get("dont_enforce_access_settings")) { $va_access_values = array(); } else { $va_access_values = caGetUserAccessValues($this->request); } $va_jumpToList = $this->ops_jumpToList; $this->view->setVar('jumpToList', $va_jumpToList); $va_periods = $this->ops_periods; $this->view->setVar('periods', $va_periods); $vn_year = $this->request->getParameter('year', pInteger); $vn_period = $this->request->getParameter('period', pInteger); if (!$vn_period) { if ($vn_year) { # --- determine the period from the year foreach ($va_periods as $i => $va_per_info) { if ($vn_year >= $va_per_info["start"] && $vn_year <= $va_per_info["end"]) { $vn_period = $i; break; } } } } $this->view->setVar('period', $vn_period); if (!$vn_year) { $vn_year = $va_periods[$vn_period]["start"]; } $this->view->setVar('year', $vn_year); $vn_y = ""; if ($va_periods[$vn_period]["displayAllYears"] == 1) { $vn_y = $va_periods[$vn_period]["start"] . " to " . $va_periods[$vn_period]["end"]; } else { $vn_y = $vn_year; } $o_search = new OccurrenceSearch(); $t_list = new ca_lists(); $vn_chronology_type_id = $t_list->getItemIDFromList('occurrence_types', 'chronology'); $vn_exhibition_type_id = $t_list->getItemIDFromList('occurrence_types', 'exhibition'); $vn_bibliography_type_id = $t_list->getItemIDFromList('occurrence_types', 'bibliography'); $vn_artwork_type_id = $t_list->getItemIDFromList('object_types', 'artwork'); $vn_chron_images_type_id = $t_list->getItemIDFromList('object_types', 'chronology_image'); $va_years_info = array(); $qr_events = $o_search->search("ca_occurrences.access:1 AND ca_occurrences.type_id:{$vn_chronology_type_id} AND ca_occurrences.date.parsed_date:\"" . $vn_y . "\"", array("sort" => "ca_occurrences.date.parsed_date", "no_cache" => !$this->opb_cache_searches)); $va_event_ids = array(); if ($qr_events->numHits() > 0) { while ($qr_events->nextHit()) { $va_event_ids[] = $qr_events->get("occurrence_id"); } } $opo_result_context = new ResultContext($this->request, "ca_occurrences", "basic_search"); foreach ($va_event_ids as $vn_event_id) { if ($opo_result_context->getIndexInResultList($vn_event_id) != '?') { $this->view->setVar("show_back_button", 1); break; } } $qr_events->seek(0); $va_years_info["events"] = $qr_events; $qr_exhibitions = $o_search->search("ca_occurrences.access:1 AND ca_occurrences.type_id:{$vn_exhibition_type_id} AND ca_occurrences.date.parsed_date:\"" . $vn_y . "\"", array("sort" => "ca_occurrences.date.parsed_date", "no_cache" => !$this->opb_cache_searches)); $va_years_info["exhibitions"] = $qr_exhibitions; $qr_bibliographies = $o_search->search("ca_occurrences.access:1 AND ca_occurrences.type_id:{$vn_bibliography_type_id} AND ca_occurrences.bib_year_published:\"" . $vn_y . "\"", array("sort" => "ca_occurrences.bib_year_published", "no_cache" => !$this->opb_cache_searches)); $va_years_info["bibliographies"] = $qr_bibliographies; $o_obj_search = new ObjectSearch(); $qr_artworks = $o_obj_search->search("ca_objects.access:1 AND ca_objects.date.parsed_date:\"" . $vn_y . "\" AND ca_objects.type_id:{$vn_artwork_type_id}", array("sort" => "ca_objects.idno_sort", "no_cache" => !$this->opb_cache_searches)); $va_years_info["artworks"] = $qr_artworks; $qr_chron_images = $o_obj_search->search("ca_objects.access:1 AND ca_objects.date.parsed_date:\"" . $vn_y . "\" AND ca_objects.type_id:{$vn_chron_images_type_id}", array("sort" => "ca_objects.date.parsed_date", "no_cache" => !$this->opb_cache_searches)); $va_years_info["chron_images"] = $qr_chron_images; $this->view->setVar('years_info', $va_years_info); $this->view->setVar('num_images', $qr_chron_images->numHits()); $va_reps = array(); if ($qr_chron_images->numHits() > 0) { while ($qr_chron_images->nextHit()) { $t_image_object = new ca_objects($qr_chron_images->get("object_id")); # Media representations to display (objects only) if ($t_primary_rep = $t_image_object->getPrimaryRepresentationInstance()) { if (!sizeof($va_access_values) || in_array($t_primary_rep->get('access'), $va_access_values)) { // check rep access # --- build array of thumbnails on related images for display under main image $va_temp = array(); $va_temp["representation_id"] = $t_primary_rep->get("representation_id"); $va_temp["rep_tinyicon"] = $t_primary_rep->getMediaTag('media', 'tinyicon'); $va_temp["object_id"] = $qr_chron_images->get("object_id"); $va_reps[$qr_chron_images->get("object_id")] = $va_temp; if (!$vn_display_image_set) { $vn_display_image_set = 1; $this->view->setVar("image_object_id", $qr_chron_images->get("object_id")); $this->view->setVar("image_description", $t_image_object->get("ca_objects.description")); $this->view->setVar("image_photographer", $t_image_object->get("ca_objects.provenance")); $this->view->setVar('t_primary_rep', $t_primary_rep); $va_rep_display_info = caGetMediaDisplayInfo('detail', $t_primary_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE')); $this->view->setVar('primary_rep_display_version', $va_rep_display_info['display_version']); unset($va_display_info['display_version']); $va_rep_display_info['poster_frame_url'] = $t_primary_rep->getMediaUrl('media', $va_rep_display_info['poster_frame_version']); unset($va_display_info['poster_frame_version']); $this->view->setVar('primary_rep_display_options', $va_rep_display_info); } } } } } $this->view->setVar("reps", $va_reps); $this->render('Chronology/year_detail_html.php'); }
{{{_fulltext%width=220px&height=100px}}} </div> <br style="clear: both;"/> <div style="float: right; margin-left: 20px;">{{{reset%label=Reset}}}</div> <div style="float: right;">{{{submit%label=Search}}}</div> {{{/form}}} <div class='clearfix'></div> </div> </div><!--end col-sm-8--> <div class="col-sm-6"> <div class="exhibitions"> <h1>Glenstone Exhibitions</h1> <?php $o_exhibition_search = new OccurrenceSearch(); $o_exhibition_search->setTypeRestrictions(array('exhibition')); $qr_exhibitions = $o_exhibition_search->search("*", array('checkAccess' => $va_access_values, 'sort' => 'ca_occurrences.exh_dates', 'sort_direction' => 'desc')); if ($qr_exhibitions->numHits()) { while ($qr_exhibitions->nextHit()) { print "<div class='exhibition'>" . caNavLink($this->request, $qr_exhibitions->get('ca_occurrences.preferred_labels'), '', '', 'Detail', 'occurrences/' . $qr_exhibitions->get('ca_occurrences.occurrence_id')) . "</div>"; } } ?> </div> </div> <!--end col-sm-4--> </div><!--end row--> </div> <!--end container-->
* ---------------------------------------------------------------------- */ $t_entity = $this->getVar('t_item'); $vn_entity_id = $t_entity->getPrimaryKey(); $vs_title = $this->getVar('label'); $va_access_values = $this->getVar('access_values'); require_once __CA_LIB_DIR__ . '/ca/Search/OccurrenceSearch.php'; # --- get all actions associated with the entity so can visualize in chronology timeline JavascriptLoadManager::register('jcarousel'); $t_list = new ca_lists(); $vn_action_type_id = $t_list->getItemIDFromList('occurrence_types', 'action'); $vn_context_type_id = $t_list->getItemIDFromList('occurrence_types', 'context'); $o_search = new OccurrenceSearch(); $o_search->setTypeRestrictions(array($vn_context_type_id, $vn_action_type_id)); $o_search->addResultFilter("ca_occurrences.access", "IN", join(',', $va_access_values)); $qr_res = $o_search->search("ca_entities.entity_id:{$vn_entity_id}", array('sort' => 'ca_occurrences.date.dates_value', 'sort_direction' => 'asc')); $va_actions = array(); $va_action_map = array(); if ($qr_res->numHits() > 0) { $t_occ = new ca_occurrences(); $i = 0; while ($qr_res->nextHit() && $i <= 25) { $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' => $va_access_values)); $va_projects = $t_occ->get("ca_collections", array("restrictToTypes" => array("project"), "returnAsArray" => 1, 'checkAccess' => $va_access_values)); if (!($vs_date = trim($qr_res->get('ca_occurrences.date.dates_value', array('dateFormat' => 'delimited'))))) { continue; } if ($vs_date == 'present') {
/** * */ 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; }
$t_collection = $this->getVar('t_item'); $vn_collection_id = $t_collection->getPrimaryKey(); $vs_title = $this->getVar('label'); $va_access_values = $this->getVar('access_values'); $t_list = new ca_lists(); $vn_silo_id = $t_list->getItemIDFromList('collection_types', 'silo'); require_once __CA_LIB_DIR__ . '/ca/Search/OccurrenceSearch.php'; # --- get all actions associated with the collection so can visualize in chronology timeline JavascriptLoadManager::register('jcarousel'); $t_list = new ca_lists(); $vn_action_type_id = $t_list->getItemIDFromList('occurrence_types', 'action'); $vn_context_type_id = $t_list->getItemIDFromList('occurrence_types', 'context'); $o_search = new OccurrenceSearch(); $o_search->setTypeRestrictions(array($vn_context_type_id, $vn_action_type_id)); $o_search->addResultFilter("ca_occurrences.access", "IN", join(',', $va_access_values)); $qr_res = $o_search->search("ca_collections.collection_id:{$vn_collection_id}", array('sort' => 'ca_occurrences.date.dates_value', 'sort_direction' => 'asc')); $va_actions = array(); $va_action_map = array(); if ($qr_res->numHits()) { $t_occ = new ca_occurrences(); $i = 0; while ($qr_res->nextHit() && $i <= 25) { $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' => $va_access_values)); $va_projects = $t_occ->get("ca_collections", array("restrictToTypes" => array("project"), "returnAsArray" => 1, 'checkAccess' => $va_access_values)); if (!($vs_date = trim($qr_res->get('ca_occurrences.date.dates_value', array('dateFormat' => 'delimited'))))) { continue; } if ($vs_date == 'present') {
/** * */ public function secondarySearch() { $pn_spage = (int) $this->request->getParameter('spage', pInteger); $ps_type = $this->request->getParameter('type', pString); $this->view->setVar('search_type', $ps_type); $va_access_values = caGetUserAccessValues($this->request); $ps_search = $this->opo_result_context->getSearchExpression(); switch ($ps_type) { case 'ca_entities': $o_search = new EntitySearch(); $qr_res = $o_search->search($ps_search, array('checkAccess' => $va_access_values)); break; case 'ca_places': $o_search = new PlaceSearch(); $qr_res = $o_search->search($ps_search, array('checkAccess' => $va_access_values)); break; case 'ca_occurrences': $o_search = new OccurrenceSearch(); $qr_res = $o_search->search($ps_search, array('checkAccess' => $va_access_values)); break; case 'ca_collections': $o_search = new CollectionSearch(); $qr_res = $o_search->search($ps_search, array('checkAccess' => $va_access_values)); break; default: $this->response->setRedirect($this->request->config->get('error_display_url') . '/n/' . _t('Invalid secondary search type') . '?r=' . urlencode($this->request->getFullUrlPath())); return; break; } $this->view->setVar('secondaryItemsPerPage', $this->opa_items_per_secondary_search_page); $this->view->setVar('page_' . $ps_type, $pn_spage); if ($pn_spage > 0) { $qr_res->seek($pn_spage * $this->opa_items_per_secondary_search_page); } $this->view->setVar('secondary_search_' . $ps_type, $qr_res); $this->render('Results/search_secondary_results/' . $ps_type . '_html.php'); }
private function _doSearch($ps_type, $ps_search, $ps_sort) { $va_access_values = caGetUserAccessValues($this->request); $vb_no_cache = (bool) $this->request->getParameter('no_cache', pInteger); if (!$this->request->user->canDoAction('can_search_' . ($ps_type == 'ca_tour_stops' ? 'ca_tours' : $ps_type))) { return ''; } switch ($ps_type) { case 'ca_objects': $o_object_search = new ObjectSearch(); return $o_object_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_object_lots': $o_object_lots_search = new ObjectLotSearch(); return $o_object_lots_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_entities': $o_entity_search = new EntitySearch(); return $o_entity_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_places': $o_place_search = new PlaceSearch(); return $o_place_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_occurrences': $o_occurrence_search = new OccurrenceSearch(); return $o_occurrence_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_collections': $o_collection_search = new CollectionSearch(); return $o_collection_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_storage_locations': $o_storage_location_search = new StorageLocationSearch(); return $o_storage_location_search->search($ps_search == '*' ? '(ca_storage_locations.is_enabled:1)' : '(' . $ps_search . ') AND (ca_storage_locations.is_enabled:1)', array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_loans': $o_loan_search = new LoanSearch(); return $o_loan_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_movements': $o_movement_search = new MovementSearch(); return $o_movement_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_tours': $o_tour_search = new TourSearch(); return $o_tour_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; case 'ca_tour_stops': $o_tour_stop_search = new TourStopSearch(); return $o_tour_stop_search->search($ps_search, array('sort' => $ps_sort, 'search_source' => 'Quick', 'limit' => $this->opn_num_results_per_item_type, 'no_cache' => $vb_no_cache, 'checkAccess' => $va_access_values)); break; default: return null; break; } }
<?php require_once __CA_MODELS_DIR__ . '/ca_occurrences.php'; require_once __CA_LIB_DIR__ . '/ca/Search/OccurrenceSearch.php'; $va_access_values = caGetUserAccessValues($this->request); $o_search = new OccurrenceSearch(); $o_search->setTypeRestrictions(array('report')); $qr_res = $o_search->search("*", array('checkAccess' => $va_access_values)); # ------------------------------------------------------- # Media attribute bundle download # ------------------------------------------------------- /** * Initiates user download of media stored in a media attribute, returning file in response to request. * Adds download output to response directly. No view is used. * * @param array $pa_options Array of options passed through to _initView */ if (!function_exists("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}");
function Index() { $vn_y = $this->ops_date_range; $va_period_data = array(); // // Do browse for objects from period; we'll use the facets for related entities, occurrences and list items // from this browse to generate lists of which have related objects to show from it. // $vo_object_browse = new ObjectBrowse(); // we'll do a browse $vo_object_browse->addCriteria('_search', array('ca_objects.creation_date:"' . $vn_y . '"')); // criteria is a search for creation date $vo_object_browse->execute(); // execute the browse // // Get events & exhibitions (occurrences) // $o_occ_search = new OccurrenceSearch(); $qr_occs = $o_occ_search->search("ca_occurrences.event_date:\"" . $vn_y . "\"", array("sort" => "ca_occurrences.event_date", "no_cache" => !$this->opb_cache_searches, "checkAccess" => $this->opa_access_values)); $va_occ_ids = array(); while ($qr_occs->nextHit()) { $va_occ_ids[] = $qr_occs->get("ca_occurrences.occurrence_id"); } $qr_occs->seek(0); // result context for occ $o_search_result_context_occ = new ResultContext($this->request, "ca_occurrences", 'chronology'); $o_search_result_context_occ->setAsLastFind(); $o_search_result_context_occ->setResultList($va_occ_ids); $o_search_result_context_occ->setParameter("period", $this->opn_period); $o_search_result_context_occ->saveContext(); $va_period_data["occurrences"] = $qr_occs; // Get list of occurrences that have associated objects *from this period* $va_related_occs = $vo_object_browse->getFacet('occurrence_facet'); $va_period_data["occurrences_with_objects"] = is_array($va_related_occs) ? array_keys($vo_object_browse->getFacet('occurrence_facet')) : array(); // grab the related occurrences facet to get a list of occurrences with objects; the keys of the returned array are occurrence_ids // // Get entity list // $o_ent_search = new EntitySearch(); $qr_entities = $o_ent_search->search("ca_entities.arrival_date:\"" . $vn_y . "\"", array("sort" => "ca_entity_labels.surname", "no_cache" => !$this->opb_cache_searches, "checkAccess" => $this->opa_access_values)); $va_entity_ids = array(); while ($qr_entities->nextHit()) { $va_entity_ids[] = $qr_entities->get("ca_entities.entity_id"); } $qr_entities->seek(0); $this->opo_search_result_context_entity->setAsLastFind(); $this->opo_search_result_context_entity->setResultList($va_entity_ids); $this->opo_search_result_context_entity->setParameter("period", $this->opn_period); $this->opo_search_result_context_entity->saveContext(); $va_period_data["entities"] = $qr_entities; $va_related_entities = $vo_object_browse->getFacet('entity_facet'); $va_period_data["entities_with_objects"] = is_array($va_related_entities) ? array_keys($va_related_entities) : array(); // grab the related entities facet to get a list of entities with objects; the keys of the returned array are entity_ids // // Get styles/schools (list items) list // $o_styles_schools_search = new ListItemSearch(); $qr_styles_schools_search = $o_styles_schools_search->search("ca_list_items.term_date:\"" . $vn_y . "\"", array("sort" => "ca_list_item_labels.name_singular", "no_cache" => !$this->opb_cache_searches, "checkAccess" => $this->opa_access_values)); $va_period_data["styles_schools"] = $qr_styles_schools_search; $va_related_list_items = $vo_object_browse->getFacet('style'); $va_period_data["list_items_with_objects"] = is_array($va_related_list_items) ? array_keys($va_related_list_items) : array(); // grab the related list items facet to get a list of list items with objects; the keys of the returned array are item_ids # -- make array of entity_ids so can find places associated with these entities to map // $va_entities = array(); // if($qr_entities->numHits()){ // while($qr_entities->nextHit()){ // $va_entities[] = $qr_entities->get("entity_id"); // } // } // $qr_entities->seek(0); // $o_place_search = new PlaceSearch(); // $o_place_search->addResultFilter("ca_entities.entity_id", "IN", join(',', $va_entities)); // $qr_places = $o_place_search->search("*", array("no_cache" => !$this->opb_cache_searches, "checkAccess" => $this->opa_access_values)); // $o_map = new GeographicMap(450, 250, 'map'); // $va_map_stats = $o_map->mapFrom($qr_places, "georeference", array("ajaxContentUrl" => caNavUrl($this->request, "eastend", "Chronology", "getMapItemInfo"), "request" => $this->request, "checkAccess" => $this->opa_access_values)); // $va_period_data["map"] = $o_map->render('HTML', array('delimiter' => "<br/>")); // $va_period_data["places"] = $qr_places; $o_obj_search = new ObjectSearch(); $qr_objects = $o_obj_search->search("ca_objects.creation_date:\"" . $vn_y . "\" AND (ca_object.object_status:349 OR ca_object.object_status:347 OR ca_object.object_status:193)", array("sort" => "ca_objects.creation_date", "no_cache" => !$this->opb_cache_searches, "checkAccess" => $this->opa_access_values)); $va_period_data["objects"] = $qr_objects; $va_object_ids = array(); while ($qr_objects->nextHit()) { $va_object_ids[] = $qr_objects->get("ca_objects.object_id"); } $qr_objects->seek(0); $this->opo_result_context->setAsLastFind(); $this->opo_result_context->setResultList($va_object_ids); $this->opo_result_context->setParameter("period", $this->opn_period); $this->opo_result_context->saveContext(); $this->view->setVar('period_data', $va_period_data); $this->render('chronology_period_html.php'); }