You are here

class TransactionExecutionEvent in Transaction 8

Event that is fired when a transaction is executed.

Hierarchy

Expanded class hierarchy of TransactionExecutionEvent

See also

\Drupal\transaction\TransactionInterface::execute()

1 file declares its use of TransactionExecutionEvent
TransactorHandler.php in src/TransactorHandler.php

File

src/Event/TransactionExecutionEvent.php, line 13

Namespace

Drupal\transaction\Event
View source
class TransactionExecutionEvent extends Event {
  const EVENT_NAME = 'rules_transaction_execution';

  /**
   * The involved transaction.
   *
   * @var \Drupal\transaction\TransactionInterface
   *
   * @todo set this property as protected once rules support getters
   * @see https://www.drupal.org/project/rules/issues/2762517
   */
  public $transaction;

  /**
   * Constructs the transaction execution event.
   *
   * @param \Drupal\transaction\TransactionInterface $transaction
   *   The executed transaction.
   */
  public function __construct(TransactionInterface $transaction) {
    $this->transaction = $transaction;
  }

  /**
   * Gets the executed transaction.
   *
   * @return \Drupal\transaction\TransactionInterface
   *   The executed transaction.
   */
  public function getTransaction() {
    return $this->transaction;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TransactionExecutionEvent::$transaction public property The involved transaction.
TransactionExecutionEvent::EVENT_NAME constant
TransactionExecutionEvent::getTransaction public function Gets the executed transaction.
TransactionExecutionEvent::__construct public function Constructs the transaction execution event.