class CheckoutOrderRequestEvent in Commerce PayPal 8
Defines the Checkout order request event.
Hierarchy
- class \Drupal\commerce_paypal\Event\CheckoutOrderRequestEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of CheckoutOrderRequestEvent
See also
\Drupal\commerce_paypal\Event\CommercePaypalEvents
1 file declares its use of CheckoutOrderRequestEvent
- CheckoutSdk.php in src/
CheckoutSdk.php
File
- src/
Event/ CheckoutOrderRequestEvent.php, line 13
Namespace
Drupal\commerce_paypal\EventView source
class CheckoutOrderRequestEvent extends Event {
/**
* The order.
*
* @var \Drupal\commerce_order\Entity\OrderInterface
*/
protected $order;
/**
* The API request body.
*
* @var array
*/
protected $requestBody;
/**
* Constructs a new CheckoutOrderRequestEvent object.
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
* @param array $request_body
* The API request body.
*/
public function __construct(OrderInterface $order, array $request_body) {
$this->order = $order;
$this->requestBody = $request_body;
}
/**
* Gets the order.
*
* @return \Drupal\commerce_order\Entity\OrderInterface
* The order.
*/
public function getOrder() {
return $this->order;
}
/**
* Gets the API request body.
*
* @return array
* The API request body.
*/
public function getRequestBody() {
return $this->requestBody;
}
/**
* Sets the API request body.
*
* @param array $request_body
* The API request body.
*
* @return $this
*/
public function setRequestBody(array $request_body) {
$this->requestBody = $request_body;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CheckoutOrderRequestEvent:: |
protected | property | The order. | |
CheckoutOrderRequestEvent:: |
protected | property | The API request body. | |
CheckoutOrderRequestEvent:: |
public | function | Gets the order. | |
CheckoutOrderRequestEvent:: |
public | function | Gets the API request body. | |
CheckoutOrderRequestEvent:: |
public | function | Sets the API request body. | |
CheckoutOrderRequestEvent:: |
public | function | Constructs a new CheckoutOrderRequestEvent object. |