You are here

public function TransactorHandlerInterface::doExecute in Transaction 8

Executes a transaction.

Parameters

\Drupal\transaction\TransactionInterface $transaction: The transaction to execute.

bool $save: Save the transaction after succeeded execution.

\Drupal\User\UserInterface $executor: (optional) The user that executes the transaction. The current user by default.

Return value

bool TRUE if transaction was executed, FALSE otherwise.

Throws

\Drupal\transaction\InvalidTransactionStateException If the transaction is already executed.

\Drupal\transaction\Exception\ExecutionTimeoutException If the transaction execution time exceeds the allowed threshold.

1 method overrides TransactorHandlerInterface::doExecute()
TransactorHandler::doExecute in src/TransactorHandler.php
Executes a transaction.

File

src/TransactorHandlerInterface.php, line 34

Class

TransactorHandlerInterface
Defines an interface for transactor handler.

Namespace

Drupal\transaction

Code

public function doExecute(TransactionInterface $transaction, $save = TRUE, UserInterface $executor = NULL);