class FedExEventSubscriber in Commerce FedEx 8
Same name in this branch
- 8 modules/dry_ice/src/EventSubscriber/FedExEventSubscriber.php \Drupal\commerce_fedex_dry_ice\EventSubscriber\FedExEventSubscriber
- 8 modules/dangerous/src/EventSubscriber/FedExEventSubscriber.php \Drupal\commerce_fedex_dangerous\EventSubscriber\FedExEventSubscriber
Provides a FedEx event subscriber.
@package Drupal\commerce_fedex_dangerous\EventSubscriber
Hierarchy
- class \Drupal\commerce_fedex_dangerous\EventSubscriber\FedExEventSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
Expanded class hierarchy of FedExEventSubscriber
1 string reference to 'FedExEventSubscriber'
- commerce_fedex_dangerous.services.yml in modules/
dangerous/ commerce_fedex_dangerous.services.yml - modules/dangerous/commerce_fedex_dangerous.services.yml
1 service uses FedExEventSubscriber
File
- modules/
dangerous/ src/ EventSubscriber/ FedExEventSubscriber.php, line 14
Namespace
Drupal\commerce_fedex_dangerous\EventSubscriberView source
class FedExEventSubscriber implements EventSubscriberInterface {
/**
* Alter the rate request event.
*
* @param \Drupal\commerce_fedex\Event\RateRequestEvent $event
* The rate request event.
*/
public function onBeforeRateRequest(RateRequestEvent $event) {
$rate_request = $event
->getRateRequest();
// @todo Alter the rate request.
}
/**
* Function getSubscribedEvents.
*
* @return array
* The subscribed events.
*/
public static function getSubscribedEvents() {
$events = [];
$events[CommerceFedExEvents::BEFORE_RATE_REQUEST][] = [
'onBeforeRateRequest',
];
return $events;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FedExEventSubscriber:: |
public static | function | Function getSubscribedEvents. | |
FedExEventSubscriber:: |
public | function | Alter the rate request event. |