function TransactionManagerInterface::push

Same name in other branches
  1. 10 core/lib/Drupal/Core/Database/Transaction/TransactionManagerInterface.php \Drupal\Core\Database\Transaction\TransactionManagerInterface::push()

Pushes a new Drupal transaction on the stack.

This begins a client connection transaction if there is not one active, or adds a savepoint to the active one.

This method should only be called internally by a database driver.

Parameters

string $name: (optional) The name of the savepoint.

Return value

\Drupal\Core\Database\Transaction A Transaction object.

Throws

\Drupal\Core\Database\TransactionNameNonUniqueException If a Drupal Transaction with the specified name exists already.

1 method overrides TransactionManagerInterface::push()
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/TransactionManagerInterface.php, line 50

Class

TransactionManagerInterface
Interface for the database transaction manager classes.

Namespace

Drupal\Core\Database\Transaction

Code

public function push(string $name = '') : Transaction;

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