Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TransactionManagerBase.php

function TransactionManagerBase::addPostTransactionCallback

Overrides TransactionManagerInterface::addPostTransactionCallback

File

core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php, line 392

Class

TransactionManagerBase
The database transaction manager base class.

Namespace

Drupal\Core\Database\Transaction

Code

public function addPostTransactionCallback(callable $callback) : void {
    if (!$this->inTransaction()) {
        throw new \LogicException('Root transaction end callbacks can only be added when there is an active transaction.');
    }
    $this->postTransactionCallbacks[] = $callback;
}
RSS feed
Powered by Drupal