You are here

public function UnsavedIndexConfiguration::setServer in Search API 8

Sets the server the index is attached to.

Parameters

\Drupal\search_api\ServerInterface|null $server: The server to move this index to, or NULL.

Return value

$this

Overrides IndexInterface::setServer

File

src/UnsavedIndexConfiguration.php, line 357

Class

UnsavedIndexConfiguration
Represents a configuration of an index that was not yet permanently saved.

Namespace

Drupal\search_api

Code

public function setServer(ServerInterface $server = NULL) {
  $this->entity
    ->setServer($server);
  return $this;
}