function Sql::getDatabase

Same name and namespace in other branches
  1. 8.9.x 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()
  3. 11.x 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 310

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.