function Connection::transactionManager

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::transactionManager()

Returns the transaction manager.

Return value

\Drupal\Core\Database\Transaction\TransactionManagerInterface|false The transaction manager, or FALSE if not available.

6 calls to Connection::transactionManager()
Connection::addRootTransactionEndCallback in core/lib/Drupal/Core/Database/Connection.php
Adds a root transaction end callback.
Connection::commitAll in core/lib/Drupal/Core/Database/Connection.php
Commits all the open transactions.
Connection::inTransaction in core/lib/Drupal/Core/Database/Connection.php
Determines if there is an active transaction open.
Connection::rollBack in core/lib/Drupal/Core/Database/Connection.php
Rolls back the transaction entirely or to a named savepoint.
Connection::startTransaction in core/lib/Drupal/Core/Database/Connection.php
Returns a new DatabaseTransaction object on this connection.

... See full list

File

core/lib/Drupal/Core/Database/Connection.php, line 1401

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function transactionManager() : TransactionManagerInterface|false {
    if (!isset($this->transactionManager)) {
        try {
            $this->transactionManager = $this->driverTransactionManager();
        } catch (\LogicException $e) {
            $this->transactionManager = FALSE;
        }
    }
    return $this->transactionManager;
}

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