function TransactionManagerBase::addPostTransactionCallback
Same name in other branches
- 10 core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php \Drupal\Core\Database\Transaction\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\TransactionCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.