function TransactionManagerBase::processPostTransactionCallbacks

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

Processes the post-transaction callbacks.

1 call to TransactionManagerBase::processPostTransactionCallbacks()
TransactionManagerBase::unpile in core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php

File

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

Class

TransactionManagerBase
The database transaction manager base class.

Namespace

Drupal\Core\Database\Transaction

Code

protected function processPostTransactionCallbacks() : void {
  if (!empty($this->postTransactionCallbacks)) {
    $callbacks = $this->postTransactionCallbacks;
    $this->postTransactionCallbacks = [];
    foreach ($callbacks as $callback) {
      call_user_func($callback, $this->getConnectionTransactionState() === ClientConnectionTransactionState::Committed || $this->getConnectionTransactionState() === ClientConnectionTransactionState::Voided);
    }
  }
}

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