You are here

public static function StripeBase::processActions in Stripe 2.x

Flatten the sub-elements.

This is so that the "#tree" can be used but this elements is presented as a regular 'composite element' to FAPI.

See also

https://www.drupal.org/project/drupal/issues/784874#comment-11420347

File

src/Element/StripeBase.php, line 55

Class

StripeBase
Provides the base for our Stripe elements

Namespace

Drupal\stripe\Element

Code

public static function processActions(&$element, FormStateInterface $form_state, &$complete_form) {
  array_pop($element['#parents']);
  array_pop($element['#parents']);
  return $element;
}