class ConfigurableSearchPluginBase
Same name in other branches
- 9 core/modules/search/src/Plugin/ConfigurableSearchPluginBase.php \Drupal\search\Plugin\ConfigurableSearchPluginBase
- 8.9.x core/modules/search/src/Plugin/ConfigurableSearchPluginBase.php \Drupal\search\Plugin\ConfigurableSearchPluginBase
- 10 core/modules/search/src/Plugin/ConfigurableSearchPluginBase.php \Drupal\search\Plugin\ConfigurableSearchPluginBase
Provides a base implementation for a configurable Search plugin.
Hierarchy
- class \Drupal\search\Plugin\ConfigurableSearchPluginBase extends \Drupal\search\Plugin\SearchPluginBase implements \Drupal\search\Plugin\ConfigurableSearchPluginInterface
Expanded class hierarchy of ConfigurableSearchPluginBase
3 files declare their use of ConfigurableSearchPluginBase
- EntitySearchPage.php in core/
modules/ search/ src/ Plugin/ migrate/ destination/ EntitySearchPage.php - NodeSearch.php in core/
modules/ node/ src/ Plugin/ Search/ NodeSearch.php - SearchExtraTypeSearch.php in core/
modules/ search/ tests/ modules/ search_extra_type/ src/ Plugin/ Search/ SearchExtraTypeSearch.php
File
-
core/
modules/ search/ src/ Plugin/ ConfigurableSearchPluginBase.php, line 11
Namespace
Drupal\search\PluginView source
abstract class ConfigurableSearchPluginBase extends SearchPluginBase implements ConfigurableSearchPluginInterface {
/**
* The unique ID for the search page using this plugin.
*
* @var string
*/
protected $searchPageId;
/**
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->setConfiguration($configuration);
}
/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return [];
}
/**
* {@inheritdoc}
*/
public function getConfiguration() {
return $this->configuration;
}
/**
* {@inheritdoc}
*/
public function setConfiguration(array $configuration) {
$this->configuration = NestedArray::mergeDeep($this->defaultConfiguration(), $configuration);
}
/**
* {@inheritdoc}
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
return [];
}
/**
* {@inheritdoc}
*/
public function setSearchPageId($search_page_id) {
$this->searchPageId = $search_page_id;
return $this;
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.