You are here

public function Sql::getDatabase in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::getDatabase()
  2. 9 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.

19 calls to Sql::getDatabase()
Sql::clearMessages in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Clears all messages from the map.
Sql::delete in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Deletes the map and message entries for a given source record.
Sql::deleteDestination in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Deletes the map and message table entries for a given destination row.
Sql::destroy in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Removes any persistent storage used by this map.
Sql::ensureTables in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Create the map and message tables if they don't already exist.

... See full list

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 293

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