class FacetapiQueryType in Facet API 6.3
Same name and namespace in other branches
- 7.2 plugins/facetapi/query_type.inc \FacetapiQueryType
- 7 plugins/facetapi/query_type.inc \FacetapiQueryType
Base class for query type plugins.
Hierarchy
- class \FacetapiQueryType
Expanded class hierarchy of FacetapiQueryType
1 string reference to 'FacetapiQueryType'
File
- plugins/
facetapi/ query_type.inc, line 41 - Interfaces and base classes for query type plugins.
View source
class FacetapiQueryType {
/**
* The adapter object.
*
* @var FacetapiAdapter
*/
protected $adapter;
/**
* The facet definition.
*
* @var array
*/
protected $facet;
/**
*
* @param FacetapiAdapter $adapter
* The adapter object.
*/
public function __construct(FacetapiAdapter $adapter, array $facet) {
$this->adapter = $adapter;
$this->facet = $facet;
}
/**
* Allows additional information to be added to the active items.
*
* A common use case is extracting the start and end values in a range facet.
*
* @param array $value
* The active item.
*
* @return array
* An array containing the addition information to add to the item.
*/
public function extract(array $item) {
return array();
}
/**
* Returns settings.
*
* @param string|array $realm
* The machine readable name of the realm or realm definition. Pass null to
* get global settings.
*
* @return
* An object containing the settings.
*/
public function getSettings($realm = NULL) {
return $this->adapter
->getFacet($this->facet)
->getSettings($realm);
}
/**
* Returns the facet's active items.
*
* @return array
* The facet's active items.
*/
public function getActiveItems() {
return $this->adapter
->getActiveItems($this->facet);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FacetapiQueryType:: |
protected | property | The adapter object. | |
FacetapiQueryType:: |
protected | property | The facet definition. | |
FacetapiQueryType:: |
public | function | Allows additional information to be added to the active items. | 2 |
FacetapiQueryType:: |
public | function | Returns the facet's active items. | |
FacetapiQueryType:: |
public | function | Returns settings. | |
FacetapiQueryType:: |
public | function | 1 |