You are here

protected function SearchPluginCollection::initializePlugin in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/search/src/Plugin/SearchPluginCollection.php \Drupal\search\Plugin\SearchPluginCollection::initializePlugin()

Initializes and stores a plugin.

Parameters

string $instance_id: The ID of the plugin instance to initialize.

Overrides DefaultSingleLazyPluginCollection::initializePlugin

File

core/modules/search/src/Plugin/SearchPluginCollection.php, line 55
Contains \Drupal\search\Plugin\SearchPluginCollection.

Class

SearchPluginCollection
Provides a container for lazily loading search plugins.

Namespace

Drupal\search\Plugin

Code

protected function initializePlugin($instance_id) {
  parent::initializePlugin($instance_id);
  $plugin_instance = $this->pluginInstances[$instance_id];
  if ($plugin_instance instanceof ConfigurableSearchPluginInterface) {
    $plugin_instance
      ->setSearchPageId($this->searchPageId);
  }
}