Exemplo n.º 1
0
 /**
  * Looks for 'view' parameter and sets browse facet view to alternate based upon parameter value if specified.
  * This lets you set a custom browse facet view from a link.
  * Note that the view parameter is NOT a full view name. Rather it is a simple text string (letters, numbers and underscores only)
  * that is inserted between "ajax_browse_facet_" and "_html.php" to construct a view name in themes/<theme_name>/views/Browse.
  * If a view with this name exists it will be used, otherwise the default view in Browse/ajax_browse_facet_html.php.
  *
  */
 public function getFacet($pa_options = null)
 {
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     if ($ps_view = preg_replace('![^A-Za-z0-9_]+!', '', $this->request->getParameter('view', pString))) {
         $vs_relative_path = 'Browse/ajax_browse_facet_' . $ps_view . '_html.php';
         if (file_exists($this->request->getThemeDirectoryPath() . '/views/' . $vs_relative_path)) {
             $pa_options['view'] = $vs_relative_path;
         }
     }
     parent::getFacet($pa_options);
 }
Exemplo n.º 2
0
 /**
  *
  * This is a version of the getfacet function in the main browse controller.
  * Difference are: this clears all criteria before generating the facet since the artist browser only supports single level browsing, we need all facets to show up all the time - also needs to set the search to ristrict by entity source
  * this facet view that is included is in the plugin's views/Browse folder - *not* the theme's views/Browse folder
  *
  * Looks for 'view' parameter and sets browse facet view to alternate based upon parameter value if specified.
  * This lets you set a custom browse facet view from a link.
  * Note that the view parameter is NOT a full view name. Rather it is a simple text string (letters, numbers and underscores only)
  * that is inserted between "ajax_browse_facet_" and "_html.php" to construct a view name in themes/<theme_name>/views/Browse.
  * If a view with this name exists it will be used, otherwise the default view in Browse/ajax_browse_facet_html.php.
  *
  */
 public function getFacet($pa_options = null)
 {
     // Remove any browse criteria previously set
     $this->opo_browse->setFacetGroup("map");
     $this->opo_browse->removeAllCriteria();
     $this->opo_browse->addCriteria('has_georefs', '1');
     $this->opo_browse->execute();
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     if ($ps_view = preg_replace('![^A-Za-z0-9_]+!', '', $this->request->getParameter('view', pString))) {
         $vs_relative_path = 'Browse/ajax_browse_facet_object_map_html.php';
         if (file_exists($this->request->getAppConfig()->get('application_plugins') . '/eastend/themes/eastend2/views/' . $vs_relative_path)) {
             $pa_options['view'] = $vs_relative_path;
         }
     }
     parent::getFacet($pa_options);
 }
 /**
  *
  * This is a version of the getfacet function in the main browse controller.
  * Difference are: this clears all criteria before generating the facet since the artist browser only supports single level browsing, we need all facets to show up all the time - also needs to set the search to ristrict by entity source
  * this facet view that is included is in the plugin's views/Browse folder - *not* the theme's views/Browse folder
  *
  * Looks for 'view' parameter and sets browse facet view to alternate based upon parameter value if specified.
  * This lets you set a custom browse facet view from a link.
  * Note that the view parameter is NOT a full view name. Rather it is a simple text string (letters, numbers and underscores only)
  * that is inserted between "ajax_browse_facet_" and "_html.php" to construct a view name in themes/<theme_name>/views/Browse.
  * If a view with this name exists it will be used, otherwise the default view in Browse/ajax_browse_facet_html.php.
  *
  */
 public function getFacet($pa_options = null)
 {
     // Remove any browse criteria previously set
     $this->opo_browse->removeAllCriteria();
     $this->opo_browse->addCriteria('_search', 'ca_entities.source_id:' . $this->aoee_featured_source . ' or ca_entities.source_id:' . $this->aoee_source . ' or ca_entities.source_id:' . $this->aoee_priority_source);
     $this->opo_browse->execute();
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     if ($ps_view = preg_replace('![^A-Za-z0-9_]+!', '', $this->request->getParameter('view', pString))) {
         $vs_relative_path = 'Browse/ajax_browse_facet_' . $ps_view . '_html.php';
         if (file_exists($this->request->getAppConfig()->get('application_plugins') . '/eastend/themes/eastend2/views/' . $vs_relative_path)) {
             $pa_options['view'] = $vs_relative_path;
         }
     }
     parent::getFacet($pa_options);
 }