You are here

class PaymentMethodAddForm in Commerce Core 8.2

Same name in this branch
  1. 8.2 modules/payment/src/Form/PaymentMethodAddForm.php \Drupal\commerce_payment\Form\PaymentMethodAddForm
  2. 8.2 modules/payment/src/PluginForm/PaymentMethodAddForm.php \Drupal\commerce_payment\PluginForm\PaymentMethodAddForm
  3. 8.2 modules/payment_example/src/PluginForm/Onsite/PaymentMethodAddForm.php \Drupal\commerce_payment_example\PluginForm\Onsite\PaymentMethodAddForm

Hierarchy

Expanded class hierarchy of PaymentMethodAddForm

File

modules/payment_example/src/PluginForm/Onsite/PaymentMethodAddForm.php, line 8

Namespace

Drupal\commerce_payment_example\PluginForm\Onsite
View 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

Namesort descending Modifiers Type Description Overrides
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function 1
DependencySerializationTrait::__wakeup public function 2
PaymentGatewayFormBase::$entity protected property The form entity.
PaymentGatewayFormBase::getEntity public function Gets the form entity. Overrides PaymentGatewayFormInterface::getEntity
PaymentGatewayFormBase::setEntity public function Sets the form entity. Overrides PaymentGatewayFormInterface::setEntity
PaymentMethodAddForm::buildConfigurationForm public function Form constructor. Overrides PaymentMethodFormBase::buildConfigurationForm
PaymentMethodAddForm::buildCreditCardForm protected function Builds the credit card form. Overrides PaymentMethodAddForm::buildCreditCardForm
PaymentMethodAddForm::buildPayPalForm protected function Builds the PayPal form.
PaymentMethodAddForm::getErrorElement public function Gets the form element to which errors should be assigned. Overrides PaymentGatewayFormBase::getErrorElement
PaymentMethodAddForm::submitConfigurationForm public function Form submission handler. Overrides PaymentMethodFormBase::submitConfigurationForm
PaymentMethodAddForm::submitCreditCardForm protected function Handles the submission of the credit card form.
PaymentMethodAddForm::submitPayPalForm protected function Handles the submission of the PayPal form.
PaymentMethodAddForm::validateConfigurationForm public function Form validation handler. Overrides PaymentMethodFormBase::validateConfigurationForm
PaymentMethodAddForm::validateCreditCardForm protected function Validates the credit card form.
PaymentMethodAddForm::validatePayPalForm protected function Validates the PayPal form.
PaymentMethodFormBase::$currentStore protected property The current store.
PaymentMethodFormBase::$entityTypeManager protected property The entity type manager.
PaymentMethodFormBase::$inlineFormManager protected property The inline form manager.
PaymentMethodFormBase::$logger protected property The logger.
PaymentMethodFormBase::create public static function Instantiates a new instance of this class. Overrides ContainerInjectionInterface::create
PaymentMethodFormBase::__construct public function Constructs a new PaymentMethodFormBase.
PluginFormBase::$plugin protected property The plugin this form is for. 3
PluginFormBase::setPlugin public function Sets the plugin for this object. Overrides PluginAwareInterface::setPlugin 1
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.