public function Sql::getDatabase in Zircon Profile 8.0
Same name and namespace in other branches
- 8 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 245 - Contains \Drupal\migrate\Plugin\migrate\id_map\Sql.
Class
- Sql
- Defines the sql based ID map implementation.
Namespace
Drupal\migrate\Plugin\migrate\id_mapCode
public function getDatabase() {
if (!isset($this->database)) {
$this->database = \Drupal::database();
}
$this
->init();
return $this->database;
}