abstract class PaymentGatewayFormBase in Commerce Core 8.2
Provides a base class for payment gateway plugin forms.
Hierarchy
- class \Drupal\Core\Plugin\PluginFormBase implements PluginAwareInterface, PluginFormInterface
- class \Drupal\commerce_payment\PluginForm\PaymentGatewayFormBase implements PaymentGatewayFormInterface uses DependencySerializationTrait, StringTranslationTrait
Expanded class hierarchy of PaymentGatewayFormBase
See also
\Drupal\Core\Plugin\PluginFormBase
File
- modules/
payment/ src/ PluginForm/ PaymentGatewayFormBase.php, line 16
Namespace
Drupal\commerce_payment\PluginFormView source
abstract class PaymentGatewayFormBase extends PluginFormBase implements PaymentGatewayFormInterface {
use DependencySerializationTrait;
use StringTranslationTrait;
/**
* The form entity.
*
* @var \Drupal\commerce_payment\Entity\EntityWithPaymentGatewayInterface
*/
protected $entity;
/**
* {@inheritdoc}
*/
public function getEntity() {
return $this->entity;
}
/**
* {@inheritdoc}
*/
public function setEntity(EntityWithPaymentGatewayInterface $entity) {
$this->entity = $entity;
return $this;
}
/**
* {@inheritdoc}
*/
public function getErrorElement(array $form, FormStateInterface $form_state) {
return $form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
PaymentGatewayFormBase:: |
protected | property | The form entity. | |
PaymentGatewayFormBase:: |
public | function |
Gets the form entity. Overrides PaymentGatewayFormInterface:: |
|
PaymentGatewayFormBase:: |
public | function |
Gets the form element to which errors should be assigned. Overrides PaymentGatewayFormInterface:: |
1 |
PaymentGatewayFormBase:: |
public | function |
Sets the form entity. Overrides PaymentGatewayFormInterface:: |
|
PluginFormBase:: |
protected | property | The plugin this form is for. | 3 |
PluginFormBase:: |
public | function |
Sets the plugin for this object. Overrides PluginAwareInterface:: |
1 |
PluginFormBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
2 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |