ConfigurableSearchPluginBase.php in Zircon Profile 8
File
core/modules/search/src/Plugin/ConfigurableSearchPluginBase.php
View source
<?php
namespace Drupal\search\Plugin;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Form\FormStateInterface;
abstract class ConfigurableSearchPluginBase extends SearchPluginBase implements ConfigurableSearchPluginInterface {
protected $searchPageId;
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->configuration = NestedArray::mergeDeep($this
->defaultConfiguration(), $this->configuration);
}
public function defaultConfiguration() {
return array();
}
public function getConfiguration() {
return $this->configuration;
}
public function setConfiguration(array $configuration) {
$this->configuration = $configuration;
}
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
}
public function calculateDependencies() {
return array();
}
public function setSearchPageId($search_page_id) {
$this->searchPageId = $search_page_id;
return $this;
}
}