class PaymentMethodAddForm in Commerce Core 8.2
Same name in this branch
- 8.2 modules/payment/src/Form/PaymentMethodAddForm.php \Drupal\commerce_payment\Form\PaymentMethodAddForm
- 8.2 modules/payment/src/PluginForm/PaymentMethodAddForm.php \Drupal\commerce_payment\PluginForm\PaymentMethodAddForm
- 8.2 modules/payment_example/src/PluginForm/Onsite/PaymentMethodAddForm.php \Drupal\commerce_payment_example\PluginForm\Onsite\PaymentMethodAddForm
Hierarchy
- class \Drupal\Core\Plugin\PluginFormBase implements PluginAwareInterface, PluginFormInterface
- class \Drupal\commerce_payment\PluginForm\PaymentGatewayFormBase implements PaymentGatewayFormInterface uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\commerce_payment\PluginForm\PaymentMethodFormBase implements ContainerInjectionInterface
- class \Drupal\commerce_payment\PluginForm\PaymentMethodAddForm
- class \Drupal\commerce_payment_example\PluginForm\Onsite\PaymentMethodAddForm
- class \Drupal\commerce_payment\PluginForm\PaymentMethodAddForm
- class \Drupal\commerce_payment\PluginForm\PaymentMethodFormBase implements ContainerInjectionInterface
- class \Drupal\commerce_payment\PluginForm\PaymentGatewayFormBase implements PaymentGatewayFormInterface uses DependencySerializationTrait, StringTranslationTrait
Expanded class hierarchy of PaymentMethodAddForm
File
- modules/
payment_example/ src/ PluginForm/ Onsite/ PaymentMethodAddForm.php, line 8
Namespace
Drupal\commerce_payment_example\PluginForm\OnsiteView source
class PaymentMethodAddForm extends BasePaymentMethodAddForm {
/**
* {@inheritdoc}
*/
protected function buildCreditCardForm(array $element, FormStateInterface $form_state) {
$element = parent::buildCreditCardForm($element, $form_state);
// Default to a known valid test credit card number.
$element['number']['#default_value'] = '4111111111111111';
return $element;
}
}
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 |
Sets the form entity. Overrides PaymentGatewayFormInterface:: |
|
PaymentMethodAddForm:: |
public | function |
Form constructor. Overrides PaymentMethodFormBase:: |
|
PaymentMethodAddForm:: |
protected | function |
Builds the credit card form. Overrides PaymentMethodAddForm:: |
|
PaymentMethodAddForm:: |
protected | function | Builds the PayPal form. | |
PaymentMethodAddForm:: |
public | function |
Gets the form element to which errors should be assigned. Overrides PaymentGatewayFormBase:: |
|
PaymentMethodAddForm:: |
public | function |
Form submission handler. Overrides PaymentMethodFormBase:: |
|
PaymentMethodAddForm:: |
protected | function | Handles the submission of the credit card form. | |
PaymentMethodAddForm:: |
protected | function | Handles the submission of the PayPal form. | |
PaymentMethodAddForm:: |
public | function |
Form validation handler. Overrides PaymentMethodFormBase:: |
|
PaymentMethodAddForm:: |
protected | function | Validates the credit card form. | |
PaymentMethodAddForm:: |
protected | function | Validates the PayPal form. | |
PaymentMethodFormBase:: |
protected | property | The current store. | |
PaymentMethodFormBase:: |
protected | property | The entity type manager. | |
PaymentMethodFormBase:: |
protected | property | The inline form manager. | |
PaymentMethodFormBase:: |
protected | property | The logger. | |
PaymentMethodFormBase:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
PaymentMethodFormBase:: |
public | function | Constructs a new PaymentMethodFormBase. | |
PluginFormBase:: |
protected | property | The plugin this form is for. | 3 |
PluginFormBase:: |
public | function |
Sets the plugin for this object. Overrides PluginAwareInterface:: |
1 |
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. |