コード例 #1
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Index() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch 
  * (eg. ObjectSearch for objects, EntitySearch for entities) and pass it to BaseSearchController->Index() 
  */
 public function Index($pa_options = null)
 {
     $pa_options['search'] = $this->opo_browse;
     AssetLoadManager::register('imageScroller');
     AssetLoadManager::register('tabUI');
     AssetLoadManager::register('panel');
     return parent::Index($pa_options);
 }
コード例 #2
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Index() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch 
  * (eg. CollectionSearch for collections, EntitySearch for entities) and pass it to BaseSearchController->Index() 
  */
 public function Index($pa_options = null)
 {
     $pa_options['search'] = new ItemTagSearch();
     return parent::Index($pa_options);
 }
コード例 #3
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Index() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch
  * (eg. ObjectSearch for objects, EntitySearch for entities) and pass it to BaseSearchController->Index()
  */
 public function Index($pa_options = null)
 {
     $pa_options['search'] = $this->opo_browse;
     AssetLoadManager::register('imageScroller');
     AssetLoadManager::register('tabUI');
     AssetLoadManager::register('panel');
     // get request data
     $va_relation_ids = explode(';', $this->getRequest()->getParameter('ids', pString));
     $vs_rel_table = $this->getRequest()->getParameter('relTable', pString);
     $vs_interstitial_prefix = $this->getRequest()->getParameter('interstitialPrefix', pString);
     $vs_primary_table = $this->getRequest()->getParameter('primaryTable', pString);
     $vn_primary_id = $this->getRequest()->getParameter('primaryID', pInteger);
     $va_access_values = caGetUserAccessValues($this->getRequest());
     if (!($vs_sort = $this->opo_result_context->getCurrentSort())) {
         $va_tmp = array_keys($this->opa_sorts);
         $vs_sort = array_shift($va_tmp);
     }
     // we need the rel table to translate the incoming relation_ids to object ids for the list search result
     $o_interstitial_res = caMakeSearchResult($vs_rel_table, $va_relation_ids);
     $va_ids = array();
     $va_relation_id_map = array();
     while ($o_interstitial_res->nextHit()) {
         $va_ids[$o_interstitial_res->get('relation_id')] = $o_interstitial_res->get('ca_objects.object_id');
         $va_relation_id_map[$o_interstitial_res->get('ca_objects.object_id')] = array('relation_id' => $o_interstitial_res->get('relation_id'), 'relationship_typename' => $o_interstitial_res->getWithTemplate('^relationship_typename'));
     }
     $this->getView()->setVar('relationIdMap', $va_relation_id_map);
     $this->getView()->setVar('interstitialPrefix', $vs_interstitial_prefix);
     $this->getView()->setVar('relTable', $vs_rel_table);
     $this->getView()->setVar('primaryTable', $vs_primary_table);
     $this->getView()->setVar('primaryID', $vn_primary_id);
     $vs_sort_direction = $this->opo_result_context->getCurrentSortDirection();
     $va_search_opts = array('sort' => $vs_sort, 'sortDirection' => $vs_sort_direction, 'checkAccess' => $va_access_values, 'no_cache' => true, 'resolveLinksUsing' => $vs_primary_table, 'primaryIDs' => array($vs_primary_table => array($vn_primary_id)));
     $o_res = caMakeSearchResult('ca_objects', array_values($va_ids), $va_search_opts);
     $pa_options['result'] = $o_res;
     $pa_options['view'] = 'Search/ca_objects_table_html.php';
     // override render
     $this->getView()->setVar('noRefine', true);
     return parent::Index($pa_options);
 }
コード例 #4
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Index() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch 
  * (eg. ObjectSearch for objects, TourStopSearch for tour stops) and pass it to BaseSearchController->Index() 
  */
 public function Index($pa_options = null)
 {
     $pa_options['search'] = $this->opo_browse;
     return parent::Index($pa_options);
 }
コード例 #5
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Search() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch 
  * (eg. ObjectSearch for objects, EntitySearch for entities) and pass it to BaseSearchController->Search() 
  */
 public function Index($pa_options = null)
 {
     $ps_search = $this->opo_result_context->getSearchExpression();
     $va_access_values = caGetUserAccessValues($this->request);
     if ($this->request->config->get('do_secondary_searches')) {
         if ($this->request->config->get('do_secondary_search_for_ca_entities')) {
             $o_search = new EntitySearch();
             $qr_res = $o_search->search($ps_search, array('no_cache' => true, 'checkAccess' => $va_access_values));
             $this->view->setVar('secondary_search_ca_entities', $qr_res);
             $this->_setResultContextForSecondarySearch('ca_entities', $ps_search, $qr_res);
         }
         if ($this->request->config->get('do_secondary_search_for_ca_places')) {
             $o_search = new PlaceSearch();
             $qr_res = $o_search->search($ps_search, array('no_cache' => true, 'checkAccess' => $va_access_values));
             $this->view->setVar('secondary_search_ca_places', $qr_res);
             $this->_setResultContextForSecondarySearch('ca_places', $ps_search, $qr_res);
         }
         if ($this->request->config->get('do_secondary_search_for_ca_occurrences')) {
             $o_search = new OccurrenceSearch();
             $qr_res = $o_search->search($ps_search, array('no_cache' => true, 'checkAccess' => $va_access_values));
             $this->view->setVar('secondary_search_ca_occurrences', $qr_res);
             $this->_setResultContextForSecondarySearch('ca_occurrences', $ps_search, $qr_res);
         }
         if ($this->request->config->get('do_secondary_search_for_ca_collections')) {
             $o_search = new CollectionSearch();
             $qr_res = $o_search->search($ps_search, array('no_cache' => true, 'checkAccess' => $va_access_values));
             $this->view->setVar('secondary_search_ca_collections', $qr_res);
             $this->_setResultContextForSecondarySearch('ca_collections', $ps_search, $qr_res);
         }
     }
     $this->view->setVar('secondaryItemsPerPage', $this->opa_items_per_secondary_search_page);
     $pa_options['search'] = $this->opo_browse;
     return parent::Index($pa_options);
 }
コード例 #6
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Search() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch 
  * (eg. StorageLocationSearch for objects, EntitySearch for entities) and pass it to BaseSearchController->Search() 
  */
 public function Index($pa_options = null)
 {
     $pa_options['search'] = $this->opo_browse;
     $this->opb_uses_hierarchy_browser = true;
     return parent::Index($pa_options);
 }
コード例 #7
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Search() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch 
  * (eg. ObjectSearch for objects, EntitySearch for entities) and pass it to BaseSearchController->Search() 
  */
 public function Index($pa_options = null)
 {
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     $pa_form_codes = caGetAvailableAdvancedSearchFormCodes($this->ops_tablename);
     $ps_form = $this->_getFormName();
     $va_form_info = caGetSearchExpressionFromAdvancedSearchForm($_REQUEST);
     $is_restricted = $_POST['access'];
     if (!($ps_search = $va_form_info['expression'])) {
         $ps_search = $this->opo_result_context->getSearchExpression();
     } else {
         $this->opo_result_context->isNewSearch(true);
         $this->opo_result_context->setParameter('form_data', $va_form_info['form_data']);
     }
     $this->opo_result_context->setSearchExpression($ps_search);
     $this->opo_result_context->saveContext(true);
     return parent::Index($this->opo_browse, array_merge($pa_options, array('view' => 'Search/ca_objects_search_advanced_html.php', 'vars' => array('form' => $ps_form, 'form_codes' => $pa_form_codes, 'is_restricted' => $is_restricted))));
 }
コード例 #8
0
 /**
  * Search handler (returns search form and results, if any)
  * Most logic is contained in the BaseSearchController->Search() method; all you usually
  * need to do here is instantiate a new subject-appropriate subclass of BaseSearch 
  * (eg. PlaceSearch for objects, EntitySearch for entities) and pass it to BaseSearchController->Search() 
  */
 public function Index($pa_options = null)
 {
     $pa_options['search'] = new RelationshipTypeSearch();
     $this->opb_uses_hierarchy_browser = true;
     return parent::Index($pa_options);
 }