You are here

protected function PaymentGatewayBase::getDefaultForms in Commerce Core 8.2

Gets the default payment gateway forms.

Return value

array A list of plugin form classes keyed by operation.

2 calls to PaymentGatewayBase::getDefaultForms()
OnsitePaymentGatewayBase::getDefaultForms in modules/payment/src/Plugin/Commerce/PaymentGateway/OnsitePaymentGatewayBase.php
Gets the default payment gateway forms.
PaymentGatewayBase::__construct in modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php
Constructs a new PaymentGatewayBase object.
1 method overrides PaymentGatewayBase::getDefaultForms()
OnsitePaymentGatewayBase::getDefaultForms in modules/payment/src/Plugin/Commerce/PaymentGateway/OnsitePaymentGatewayBase.php
Gets the default payment gateway forms.

File

modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php, line 177

Class

PaymentGatewayBase
Provides the base class for payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

protected function getDefaultForms() {
  $default_forms = [];
  if ($this instanceof SupportsStoredPaymentMethodsInterface) {
    $default_forms['add-payment-method'] = 'Drupal\\commerce_payment\\PluginForm\\PaymentMethodAddForm';
  }
  if ($this instanceof SupportsUpdatingStoredPaymentMethodsInterface) {
    $default_forms['edit-payment-method'] = 'Drupal\\commerce_payment\\PluginForm\\PaymentMethodEditForm';
  }
  if ($this instanceof SupportsAuthorizationsInterface) {
    $default_forms['capture-payment'] = 'Drupal\\commerce_payment\\PluginForm\\PaymentCaptureForm';
  }
  if ($this instanceof SupportsVoidsInterface) {
    $default_forms['void-payment'] = 'Drupal\\commerce_payment\\PluginForm\\PaymentVoidForm';
  }
  if ($this instanceof SupportsRefundsInterface) {
    $default_forms['refund-payment'] = 'Drupal\\commerce_payment\\PluginForm\\PaymentRefundForm';
  }
  return $default_forms;
}