You are here

public function ContentEntity::setDatabaseConnection in Search API 8

Sets the database connection.

Parameters

\Drupal\Core\Database\Connection $connection: The new database connection.

Return value

$this

File

src/Plugin/search_api/datasource/ContentEntity.php, line 196

Class

ContentEntity
Represents a datasource which exposes the content entities.

Namespace

Drupal\search_api\Plugin\search_api\datasource

Code

public function setDatabaseConnection(Connection $connection) : self {
  $this->database = $connection;
  return $this;
}