Example #1
0
 /**
  * Returns list of all facets that will return content for the current browse table assuming no criteria
  * with full facet information is included. If all you need is the list of facets with content, and not
  * full facet information consider using BrowseEngine::getFacetsWithContentList() which is faster.
  *
  * @return array
  */
 public function getInfoForFacetsWithContent()
 {
     if (!($va_facets_with_content = $this->opo_ca_browse_cache->getGlobalParameter('facets_with_content'))) {
         $t_browse = new BrowseEngine($this->opn_browse_table_num, null, $this->getContext());
         $t_browse->execute();
     }
     if (is_array($va_facets_with_content)) {
         $va_facets = $this->opa_browse_settings['facets'];
         $vs_facet_group = $this->getFacetGroup();
         $va_tmp = array();
         foreach ($va_facets_with_content as $vs_facet) {
             if ($vs_facet_group && $va_facets[$vs_facet]['facet_groups'] && is_array($va_facets[$vs_facet]['facet_groups']) && !in_array($vs_facet_group, $va_facets[$vs_facet]['facet_groups'])) {
                 continue;
             }
             $va_tmp[$vs_facet] = $va_facets[$vs_facet];
         }
         return $va_tmp;
     }
     return array();
 }
 /**
  * Called right before a new search is executed. The BrowseEngine instance is passed as the first parameter (refine-able searches are 
  * encapsulated in BrowseEngine objects.. You can use it to modify the search before it is executed.
  *
  * @param BrowseEngine $po_search
  * @return void
  */
 protected function hookBeforeNewSearch($po_search)
 {
     //
     // ADD "curatorial_selection" CRITERIA
     //
     $t_list = new ca_lists();
     $vn_curatorial_selection_id = $t_list->getItemIDFromList('curatorial_selection2', '1938-1940');
     $po_search->addCriteria('curatorial_selection_facet', array($vn_curatorial_selection_id));
 }
Example #3
0
    if (sizeof($va_access_values) == 0 || sizeof($va_access_values) && in_array($t_work->get("access"), $va_access_values)) {
        $featured_set_id = $t_work->get("set_id");
        $va_featured_work_ids = array_keys(is_array($va_tmp = $t_work->getItemRowIDs(array('checkAccess' => $va_access_values, 'shuffle' => 0))) ? $va_tmp : array());
        $qr_works = caMakeSearchResult('ca_objects', $va_featured_work_ids);
    }
}
?>
<div class="container">
	<div class="row">
		<div class="col-sm-4 ">
			<div class="homesection left">
				<h1>Browse Our Archive</h1>
				<hr>
<?php 
include_once __CA_LIB_DIR__ . '/ca/Browse/BrowseEngine.php';
$o_browse = new BrowseEngine('ca_objects');
$o_browse->setTypeRestrictions(array("music", "religous", "spoken_word", "unclassified"));
$o_browse->execute(array('checkAccess' => $va_access_values));
foreach (array('music_category', 'spoken_word_category', 'religious_category', 'language') as $vs_facet) {
    $va_facet_info = $o_browse->getInfoForFacet($vs_facet);
    $va_facet_items = $o_browse->getFacet($vs_facet);
    print "<h2>" . $va_facet_info['label_plural'] . "</h2>\n";
    $vn_num_categories_to_show = 40;
    $va_item_list = array();
    $vn_i = 0;
    foreach ($va_facet_items as $vn_item_id => $va_facet_item) {
        if (in_array($va_facet_item['label'], array('-NONE-', '-'))) {
            continue;
        }
        $va_item_list[] = caNavLink($this->request, $va_facet_item['label'], '', '', 'Browse', 'Rings', array('facet' => $vs_facet, 'id' => $va_facet_item['id']));
        $vn_i++;
Example #4
0
 public function execute($pa_options = null)
 {
     return parent::execute($pa_options);
 }