You are here

public function Sql::getDatabase in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::getDatabase()
  2. 10 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::getDatabase()

Gets the database connection.

Return value

\Drupal\Core\Database\Connection The database connection object.

1 call to Sql::getDatabase()
TestSqlIdMap::getDatabase in core/modules/migrate/tests/src/Unit/TestSqlIdMap.php
Gets the database connection.
1 method overrides Sql::getDatabase()
TestSqlIdMap::getDatabase in core/modules/migrate/tests/src/Unit/TestSqlIdMap.php
Gets the database connection.

File

core/modules/migrate/src/Plugin/migrate/id_map/Sql.php, line 291

Class

Sql
Defines the sql based ID map implementation.

Namespace

Drupal\migrate\Plugin\migrate\id_map

Code

public function getDatabase() {
  $this
    ->init();
  return $this->database;
}