You are here

class WishlistAssignEvent in Commerce Wishlist 8.3

Defines the wishlist assign event.

Hierarchy

  • class \Drupal\commerce_wishlist\Event\WishlistAssignEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of WishlistAssignEvent

See also

\Drupal\commerce_wishlist\Event\WishlistEvents

1 file declares its use of WishlistAssignEvent
WishlistAssignment.php in src/WishlistAssignment.php

File

src/Event/WishlistAssignEvent.php, line 14

Namespace

Drupal\commerce_wishlist\Event
View source
class WishlistAssignEvent extends Event {

  /**
   * The wishlist entity.
   *
   * @var \Drupal\commerce_wishlist\Entity\WishlistInterface
   */
  protected $wishlist;

  /**
   * The user account.
   *
   * @var \Drupal\user\UserInterface
   */
  protected $account;

  /**
   * Constructs a new WishlistAssignEvent.
   *
   * @param \Drupal\commerce_wishlist\Entity\WishlistInterface $wishlist
   *   The wishlist entity.
   * @param \Drupal\user\UserInterface $account
   *   The user account.
   */
  public function __construct(WishlistInterface $wishlist, UserInterface $account) {
    $this->wishlist = $wishlist;
    $this->account = $account;
  }

  /**
   * Gets the wishlist entity.
   *
   * @return \Drupal\commerce_wishlist\Entity\WishlistInterface
   *   The wishlist entity.
   */
  public function getWishlist() {
    return $this->wishlist;
  }

  /**
   * Gets the user account.
   *
   * @return \Drupal\user\UserInterface
   *   The user account.
   */
  public function getAccount() {
    return $this->account;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
WishlistAssignEvent::$account protected property The user account.
WishlistAssignEvent::$wishlist protected property The wishlist entity.
WishlistAssignEvent::getAccount public function Gets the user account.
WishlistAssignEvent::getWishlist public function Gets the wishlist entity.
WishlistAssignEvent::__construct public function Constructs a new WishlistAssignEvent.