You are here

public function IndexPluginBase::setIndex in Search API 8

Sets the index this plugin is configured for.

Parameters

\Drupal\search_api\IndexInterface $index: The index this plugin is configured for.

Overrides IndexPluginInterface::setIndex

2 calls to IndexPluginBase::setIndex()
ContentEntity::__construct in src/Plugin/search_api/datasource/ContentEntity.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
IndexPluginBase::__construct in src/Plugin/IndexPluginBase.php
Constructs a \Drupal\Component\Plugin\PluginBase object.

File

src/Plugin/IndexPluginBase.php, line 40

Class

IndexPluginBase
Provides a base class for plugins linked to a search index.

Namespace

Drupal\search_api\Plugin

Code

public function setIndex(IndexInterface $index) {
  $this->index = $index;
}