You are here

class FacetapiTestAdapter in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 tests/facetapi_test.plugins.inc \FacetapiTestAdapter
  2. 7 tests/facetapi_test.plugins.inc \FacetapiTestAdapter

Facet API adapter for the test module.

Hierarchy

Expanded class hierarchy of FacetapiTestAdapter

1 string reference to 'FacetapiTestAdapter'
facetapi_test_facetapi_adapters in tests/facetapi_test/facetapi_test.module
Implements hook_facetapi_widgets().

File

tests/facetapi_test/plugins/facetapi/test_adapter.inc, line 6

View source
class FacetapiTestAdapter extends FacetapiAdapter {

  /**
   * The total number of results in the query.
   */
  protected $resultCount;

  /**
   * Returns a boolean flagging whether $this->searcher executed a search.
   */
  public function searchExecuted() {
    return !empty($this->keys);
  }

  /**
   * Returns a boolean flagging whether facets in a realm shoud be displayed.
   */
  public function suppressOutput($realm_name) {
  }

  /**
   * Sets the result count.
   */
  public function setResultCount($count) {
    $this->resultCount = $count;
    return $this;
  }

  /**
   * Returns the nmber of total results found for the current search.
   */
  public function getResultCount() {
    return $this->resultCount;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FacetapiAdapter::$activeItems protected property An array of active filters.
FacetapiAdapter::$dependenciesPassed protected property Stores whether each facet passed dependencies.
FacetapiAdapter::$facets protected property An array of FacetapiFacet objects.
FacetapiAdapter::$info protected property Searcher information retrieved by the hook.
FacetapiAdapter::$keys protected property The search keys passed by the user.
FacetapiAdapter::$processed protected property A boolean flagging whether the facets have been processed.
FacetapiAdapter::$processors protected property An array of FacetapiFacetProcessor objects.
FacetapiAdapter::$queryTypes protected property An array of executed query type plugins keyed by field name.
FacetapiAdapter::$searchPath protected property Stores the search path so we only need to calculate it once.
FacetapiAdapter::$settings protected property Stores settings with defaults.
FacetapiAdapter::$urlProcessor protected property The URL processor associated with this adapter.
FacetapiAdapter::addActiveFilters function Adds facet query type plugins to the queue and invokes the execute() hook to allow for the backend to add filters to its native query object.
FacetapiAdapter::buildRealm public function Builds the render array for facets in a realm.
FacetapiAdapter::getActiveItems public function Returns a facet's active items.
FacetapiAdapter::getAllActiveItems public function Returns all active filters.
FacetapiAdapter::getDefaultSettings public function Provides default values for the backend specific settings.
FacetapiAdapter::getEnabledFacets public function Returns the enabled facets associated with the instance of the adapter.
FacetapiAdapter::getFacet public function Returns a FacetapiFacet instance for the facet being rendered.
FacetapiAdapter::getFacetPath public function Helper function that returns the facet path for a facet item.
FacetapiAdapter::getFacetQuery public function Returns a registered facet query
FacetapiAdapter::getFacetSettings public function Returns realm specific settings for a facet.
FacetapiAdapter::getFacetSettingsGlobal public function Returns realm specific settings for a facet.
FacetapiAdapter::getId public function Returns the id of the adapter plugin.
FacetapiAdapter::getMappedValue public function Returns the human readable value associated with a facet's raw value.
FacetapiAdapter::getPageLimit public function Returns the number of results per page.
FacetapiAdapter::getPageNumber public function Returns the page number of the search result set.
FacetapiAdapter::getPageTotal public function Returns the total number of pages in the result set.
FacetapiAdapter::getPath public function Returns the path to the admin settings for a given realm.
FacetapiAdapter::getProcessor public function Returns the processor associates with the facet.
FacetapiAdapter::getQueryString public function Helper function that returns the query string variables for a facet item.
FacetapiAdapter::getSearcher public function Returns the machine readable name of the searcher.
FacetapiAdapter::getSearchKeys public function Gets the search keys.
FacetapiAdapter::getSearchPath public function Returns the search path.
FacetapiAdapter::getTypes public function Returns the type of content indexed by $this->info['searcher'].
FacetapiAdapter::getUrlProcessor public function Returns the URL Processor.
FacetapiAdapter::initActiveFilters public function Allows the backend to initialize its query object before adding the facet filters.
FacetapiAdapter::initSettingsObject public function Initializes a new settings object.
FacetapiAdapter::itemActive public function Tests whether a facet item is active by passing it's value.
FacetapiAdapter::processActiveItems public function Processes active items.
FacetapiAdapter::processFacets public function Initializes facet builds, adds breadcrumb trail.
FacetapiAdapter::setParams public function Processes a raw array of active filters.
FacetapiAdapter::setSearchKeys public function Sets the search keys.
FacetapiAdapter::settingsForm public function Allows for backend specific overrides to the settings form.
FacetapiAdapter::supportsFacetMincount public function Returns TRUE if the back-end supports "minimum facet counts".
FacetapiAdapter::supportsFacetMissing public function Returns TRUE if the back-end supports "missing" facets.
FacetapiAdapter::__construct public function Constructor, sets searcher and type of content being indexed.
FacetapiTestAdapter::$resultCount protected property The total number of results in the query.
FacetapiTestAdapter::getResultCount public function Returns the nmber of total results found for the current search. Overrides FacetapiAdapter::getResultCount
FacetapiTestAdapter::searchExecuted public function Returns a boolean flagging whether $this->searcher executed a search. Overrides FacetapiAdapter::searchExecuted
FacetapiTestAdapter::setResultCount public function Sets the result count.
FacetapiTestAdapter::suppressOutput public function Returns a boolean flagging whether facets in a realm shoud be displayed. Overrides FacetapiAdapter::suppressOutput