You are here

public function FedExEventSubscriber::onBeforeRateRequest in Commerce FedEx 8

Same name in this branch
  1. 8 modules/dry_ice/src/EventSubscriber/FedExEventSubscriber.php \Drupal\commerce_fedex_dry_ice\EventSubscriber\FedExEventSubscriber::onBeforeRateRequest()
  2. 8 modules/dangerous/src/EventSubscriber/FedExEventSubscriber.php \Drupal\commerce_fedex_dangerous\EventSubscriber\FedExEventSubscriber::onBeforeRateRequest()

Alter the rate request event.

Parameters

\Drupal\commerce_fedex\Event\RateRequestEvent $event: The rate request event.

File

modules/dangerous/src/EventSubscriber/FedExEventSubscriber.php, line 22

Class

FedExEventSubscriber
Provides a FedEx event subscriber.

Namespace

Drupal\commerce_fedex_dangerous\EventSubscriber

Code

public function onBeforeRateRequest(RateRequestEvent $event) {
  $rate_request = $event
    ->getRateRequest();

  // @todo Alter the rate request.
}