You are here

public static function UltimateCronDatabaseFactory::getConnection in Ultimate Cron 8.2

Factory method that returns a Connection object with the correct target.

Return value

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

1 string reference to 'UltimateCronDatabaseFactory::getConnection'
ultimate_cron.services.yml in ./ultimate_cron.services.yml
ultimate_cron.services.yml

File

src/UltimateCronDatabaseFactory.php, line 17

Class

UltimateCronDatabaseFactory
Class DatabaseFactory

Namespace

Drupal\ultimate_cron

Code

public static function getConnection() {
  $target = _ultimate_cron_get_transactional_safe_connection();
  return Database::getConnection($target);
}