function TransactionManagerBase::has
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php \Drupal\Core\Database\Transaction\TransactionManagerBase::has()
Checks if a named Drupal transaction is active.
Parameters
string $name: The name of the transaction.
Return value
bool TRUE if the transaction is active, FALSE otherwise.
Overrides TransactionManagerInterface::has
1 call to TransactionManagerBase::has()
- TransactionManagerBase::push in core/
lib/ Drupal/ Core/ Database/ Transaction/ TransactionManagerBase.php - Pushes a new Drupal transaction on the stack.
File
-
core/
lib/ Drupal/ Core/ Database/ Transaction/ TransactionManagerBase.php, line 417
Class
- TransactionManagerBase
- The database transaction manager base class.
Namespace
Drupal\Core\Database\TransactionCode
public function has(string $name) : bool {
foreach ($this->stack() as $item) {
if ($item->name === $name) {
return TRUE;
}
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.