public function CurrentSearchItem::__construct in Facet API 7
Same name and namespace in other branches
- 6.3 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::__construct()
- 7.2 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::__construct()
Constructs a CurrentSearchItem object.
Parameters
string $name: The machine readable name of the current search item plugin as defined in hook_current_search_items() implementations.
stdClass $config: The current search block configurations as returned by current_search_item_load().
File
- contrib/
current_search/ plugins/ current_search/ item.inc, line 58 - Base current search item plugin class.
Class
- CurrentSearchItem
- Abstract class extended by current search item plugins.
Code
public function __construct($name, $config = NULL) {
$this->name = $name;
if (isset($config->settings['items'][$name])) {
$this->configName = $config->name;
$this->settings = $config->settings['items'][$name] + $this
->getDefaultSettings();
}
else {
$this->settings = $this
->getDefaultSettings();
}
}