public function FilterShippingMethodsEvent::__construct in Commerce Shipping 8.2
Constructs a new FilterShippingMethodsEvent object.
Parameters
\Drupal\commerce_shipping\Entity\ShippingMethodInterface[] $shipping_methods: The shipping methods.
\Drupal\commerce_shipping\Entity\ShipmentInterface $shipment: The shipment.
File
- src/
Event/ FilterShippingMethodsEvent.php, line 37
Class
- FilterShippingMethodsEvent
- Defines the event for filtering the available shipping methods.
Namespace
Drupal\commerce_shipping\EventCode
public function __construct(array $shipping_methods, ShipmentInterface $shipment) {
$this->shippingMethods = $shipping_methods;
$this->shipment = $shipment;
}