You are here

public function FacetapiDependency::__construct in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 plugins/facetapi/dependency.inc \FacetapiDependency::__construct()
  2. 7 plugins/facetapi/dependency.inc \FacetapiDependency::__construct()

Parameters

FacetapiAdapter $adapter:

array $facet:

array $active_items:

stdClass $settings:

array $id:

array $label:

File

plugins/facetapi/dependency.inc, line 57
Base dependency plugin class.

Class

FacetapiDependency
Abstract class extended by dependency plugins.

Code

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();
}