You are here

ActionEvent.php in Library 8

File

src/Event/ActionEvent.php
View source
<?php

namespace Drupal\library\Event;

use Drupal\library\Entity\LibraryTransaction;
use Symfony\Component\EventDispatcher\Event;

/**
 * Returns available action.
 */
class ActionEvent extends Event {

  /**
   * Library transaction.
   *
   * @var \Drupal\library\Entity\LibraryTransaction
   */
  private $transaction;

  /**
   * Constructor.
   */
  public function __construct(LibraryTransaction $transaction) {
    $this->transaction = $transaction;
  }

  /**
   * Returns the kernel in which this event was thrown.
   *
   * @return \Drupal\library\Entity\LibraryTransaction
   *   Transaction.
   */
  public function getTransaction() {
    return $this->transaction;
  }

}

Classes

Namesort descending Description
ActionEvent Returns available action.