public function Transaction::execute in Transaction 8
Executes the transaction.
The execution result code will be set or changed.
Parameters
bool $save: (optional) Save the transaction after succeeded execution.
\Drupal\User\UserInterface $executor: (optional) The user that executes the transaction. Current user by default.
Return value
bool TRUE if transaction was executed, FALSE otherwise.
Throws
\Drupal\transaction\InvalidTransactionStateException If the transaction is already executed.
Overrides TransactionInterface::execute
See also
\Drupal\transaction\TransactionInterface::getResultCode()
1 call to Transaction::execute()
- Transaction::preSave in src/
Entity/ Transaction.php - Acts on an entity before the presave hook is invoked.
File
- src/
Entity/ Transaction.php, line 372
Class
- Transaction
- Provides the transaction content entity.
Namespace
Drupal\transaction\EntityCode
public function execute($save = TRUE, UserInterface $user = NULL) {
return $this
->transactorHandler()
->doExecute($this, $save, $user);
}