class ShipmentEvent in Commerce Shipping 8.2
Defines the shipment event.
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce_shipping\Event\ShipmentEvent
Expanded class hierarchy of ShipmentEvent
See also
\Drupal\commerce_shipping\Event\ShippingEvents
1 file declares its use of ShipmentEvent
- ShipmentSubscriber.php in src/
EventSubscriber/ ShipmentSubscriber.php
File
- src/
Event/ ShipmentEvent.php, line 13
Namespace
Drupal\commerce_shipping\EventView source
class ShipmentEvent extends EventBase {
/**
* The shipment.
*
* @var \Drupal\commerce_shipping\Entity\ShipmentInterface
*/
protected $shipment;
/**
* Constructs a new ShipmentEvent.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
*/
public function __construct(ShipmentInterface $shipment) {
$this->shipment = $shipment;
}
/**
* Gets the shipment.
*
* @return \Drupal\commerce_shipping\Entity\ShipmentInterface
* Gets the shipment.
*/
public function getShipment() {
return $this->shipment;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ShipmentEvent:: |
protected | property | The shipment. | |
ShipmentEvent:: |
public | function | Gets the shipment. | |
ShipmentEvent:: |
public | function | Constructs a new ShipmentEvent. |