abstract class FacetapiDependency in Facet API 6.3
Same name and namespace in other branches
- 7.2 plugins/facetapi/dependency.inc \FacetapiDependency
- 7 plugins/facetapi/dependency.inc \FacetapiDependency
Abstract class extended by dependency plugins.
Hierarchy
- class \FacetapiDependency
Expanded class hierarchy of FacetapiDependency
1 string reference to 'FacetapiDependency'
- facetapi_facetapi_dependencies in ./
facetapi.facetapi.inc - Implements hook_facetapi_dependencies().
File
- plugins/
facetapi/ dependency.inc, line 11 - Base dependency plugin class.
View source
abstract class FacetapiDependency {
/**
* The adapter object.
*
* @var FacetapiAdapter
*/
protected $adapter;
/**
* The facet definition.
*
* @var array
*/
protected $facet;
/**
* An array of active items.
*
* @var array
*/
protected $activeItems;
/**
* An array of facet settings.
*
* @var array
*/
protected $settings;
/**
*
*
* @param FacetapiAdapter $adapter
*
* @param array $facet
*
* @param array $active_items
*
* @param stdClass $settings
*
* @param array $id
*
* @param array $label
*
*/
public function __construct($id, FacetapiAdapter $adapter, array $facet, stdClass $settings, array $active_items = array()) {
$this->id = $id;
$this->adapter = $adapter;
$this->facet = $facet;
$this->activeItems = $active_items;
// Captures dependency settings only, makes sure defaults are set.
if (empty($settings->settings['dependencies'])) {
$settings->settings['dependencies'] = array();
}
$this->settings = $settings->settings['dependencies'];
$this->settings += $this
->getDefaultSettings();
}
/**
* Gets the id of the plugin.
*
* @return string
* The machine readable name of the plugin.
*/
public function getId() {
return $this->id;
}
/**
* Gets the facet definition.
*
* @return array
* The facet definition.
*/
public function getFacet() {
return $this->facet;
}
/**
* Performs the dependency check.
*
* @return boolean|NULL
* Return NULL to pass through to other dependency plugins, or return a
* boolean to explicitly set the result.
*/
public abstract function execute();
/**
*
*/
public function settingsForm(&$form, &$form_state) {
// Nothing to do.
}
/**
*
*/
public function getDefaultSettings() {
return array();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FacetapiDependency:: |
protected | property | An array of active items. | |
FacetapiDependency:: |
protected | property | The adapter object. | |
FacetapiDependency:: |
protected | property | The facet definition. | |
FacetapiDependency:: |
protected | property | An array of facet settings. | |
FacetapiDependency:: |
abstract public | function | Performs the dependency check. | 2 |
FacetapiDependency:: |
public | function | 2 | |
FacetapiDependency:: |
public | function | Gets the facet definition. | |
FacetapiDependency:: |
public | function | Gets the id of the plugin. | |
FacetapiDependency:: |
public | function | 2 | |
FacetapiDependency:: |
public | function |