You are here

public function PayPalStandard::submitConfigurationForm in PayPal for Payment 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Payment/MethodConfiguration/PayPalStandard.php \Drupal\paypal_payment\Plugin\Payment\MethodConfiguration\PayPalStandard::submitConfigurationForm()

{}

Overrides PayPalBasic::submitConfigurationForm

File

src/Plugin/Payment/MethodConfiguration/PayPalStandard.php, line 49

Class

PayPalStandard
Provides the configuration for the PayPal Standard payment method plugin.

Namespace

Drupal\paypal_payment\Plugin\Payment\MethodConfiguration

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  parent::submitConfigurationForm($form, $form_state);
  $parents = $form['plugin_form']['paypal']['#parents'];
  array_pop($parents);
  $values = $form_state
    ->getValues();
  $values = NestedArray::getValue($values, $parents);
  $this->configuration['email'] = $values['paypal']['email'];
}