class FilterPaymentGatewaysEvent in Commerce Core 8.2
Defines the event for filtering the available payment gateways.
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce_payment\Event\FilterPaymentGatewaysEvent
Expanded class hierarchy of FilterPaymentGatewaysEvent
See also
\Drupal\commerce_payment\Event\PaymentEvents
2 files declare their use of FilterPaymentGatewaysEvent
- FilterPaymentGatewaysSubscriber.php in modules/
payment/ tests/ modules/ commerce_payment_test/ src/ EventSubscriber/ FilterPaymentGatewaysSubscriber.php - PaymentGatewayStorage.php in modules/
payment/ src/ PaymentGatewayStorage.php
File
- modules/
payment/ src/ Event/ FilterPaymentGatewaysEvent.php, line 13
Namespace
Drupal\commerce_payment\EventView source
class FilterPaymentGatewaysEvent extends EventBase {
/**
* The payment gateways.
*
* @var \Drupal\commerce_payment\Entity\PaymentGatewayInterface[]
*/
protected $paymentGateways;
/**
* The order.
*
* @var \Drupal\commerce_order\Entity\OrderInterface
*/
protected $order;
/**
* Constructs a new FilterPaymentGatewaysEvent object.
*
* @param \Drupal\commerce_payment\Entity\PaymentGatewayInterface[] $payment_gateways
* The payment gateways.
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
*/
public function __construct(array $payment_gateways, OrderInterface $order) {
$this->paymentGateways = $payment_gateways;
$this->order = $order;
}
/**
* Gets the payment gateways.
*
* @return \Drupal\commerce_payment\Entity\PaymentGatewayInterface[]
* The payment gateways.
*/
public function getPaymentGateways() {
return $this->paymentGateways;
}
/**
* Sets the payment gateways.
*
* @param \Drupal\commerce_payment\Entity\PaymentGatewayInterface[] $payment_gateways
* The payment gateways.
*
* @return $this
*/
public function setPaymentGateways(array $payment_gateways) {
$this->paymentGateways = $payment_gateways;
return $this;
}
/**
* Gets the order.
*
* @return \Drupal\commerce_order\Entity\OrderInterface
* The order.
*/
public function getOrder() {
return $this->order;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FilterPaymentGatewaysEvent:: |
protected | property | The order. | |
FilterPaymentGatewaysEvent:: |
protected | property | The payment gateways. | |
FilterPaymentGatewaysEvent:: |
public | function | Gets the order. | |
FilterPaymentGatewaysEvent:: |
public | function | Gets the payment gateways. | |
FilterPaymentGatewaysEvent:: |
public | function | Sets the payment gateways. | |
FilterPaymentGatewaysEvent:: |
public | function | Constructs a new FilterPaymentGatewaysEvent object. |