class WishlistEmptyEvent in Commerce Wishlist 8.3
Defines the wishlist empty event.
Hierarchy
- class \Drupal\commerce_wishlist\Event\WishlistEmptyEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of WishlistEmptyEvent
See also
\Drupal\commerce_wishlist\Event\WishlistEvents
1 file declares its use of WishlistEmptyEvent
File
- src/
Event/ WishlistEmptyEvent.php, line 13
Namespace
Drupal\commerce_wishlist\EventView source
class WishlistEmptyEvent extends Event {
/**
* The wishlist entity.
*
* @var \Drupal\commerce_wishlist\Entity\WishlistInterface
*/
protected $wishlist;
/**
* The removed wishlist items.
*
* @var \Drupal\commerce_wishlist\Entity\WishlistItemInterface[]
*/
protected $wishlistItems;
/**
* Constructs a new WishlistEmptyEvent.
*
* @param \Drupal\commerce_wishlist\Entity\WishlistInterface $wishlist
* The wishlist entity.
* @param \Drupal\commerce_wishlist\Entity\WishlistItemInterface[] $wishlist_items
* The removed wishlist items.
*/
public function __construct(WishlistInterface $wishlist, array $wishlist_items) {
$this->wishlist = $wishlist;
$this->wishlistItems = $wishlist_items;
}
/**
* Gets the wishlist entity.
*
* @return \Drupal\commerce_wishlist\Entity\WishlistInterface
* The wishlist entity.
*/
public function getWishlist() {
return $this->wishlist;
}
/**
* Gets the removed wishlist items.
*
* @return \Drupal\commerce_wishlist\Entity\WishlistItemInterface[]
* The removed wishlist items.
*/
public function getItems() {
return $this->wishlistItems;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WishlistEmptyEvent:: |
protected | property | The wishlist entity. | |
WishlistEmptyEvent:: |
protected | property | The removed wishlist items. | |
WishlistEmptyEvent:: |
public | function | Gets the removed wishlist items. | |
WishlistEmptyEvent:: |
public | function | Gets the wishlist entity. | |
WishlistEmptyEvent:: |
public | function | Constructs a new WishlistEmptyEvent. |