You are here

class SubscriptionEvent in Commerce Recurring Framework 8

Defines the subscription event.

Hierarchy

  • class \Drupal\commerce_recurring\Event\SubscriptionEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of SubscriptionEvent

See also

\Drupal\commerce_recurring\Event\SubscriptionEvents

File

src/Event/SubscriptionEvent.php, line 13

Namespace

Drupal\commerce_recurring\Event
View source
class SubscriptionEvent extends Event {

  /**
   * The subscription.
   *
   * @var \Drupal\commerce_recurring\Entity\SubscriptionInterface
   */
  protected $subscription;

  /**
   * Constructs a new SubscriptionEvent.
   *
   * @param \Drupal\commerce_recurring\Entity\SubscriptionInterface $subscription
   *   The subscription.
   */
  public function __construct(SubscriptionInterface $subscription) {
    $this->subscription = $subscription;
  }

  /**
   * Gets the subscription.
   *
   * @return \Drupal\commerce_recurring\Entity\SubscriptionInterface
   *   The subscription.
   */
  public function getSubscription() {
    return $this->subscription;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SubscriptionEvent::$subscription protected property The subscription.
SubscriptionEvent::getSubscription public function Gets the subscription.
SubscriptionEvent::__construct public function Constructs a new SubscriptionEvent.