You are here

public function Stripe::getInfo in Stripe 8

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides Hidden::getInfo

File

src/Element/Stripe.php, line 27

Class

Stripe
Provides a form element that will be rendered by stripe elements.

Namespace

Drupal\stripe\Element

Code

public function getInfo() {
  $info = parent::getInfo();
  $class = get_class($this);
  $info['#process'][] = [
    $class,
    'processStripe',
  ];
  $info['#pre_render'][] = [
    $class,
    'preRenderStripe',
  ];
  $info['#theme_wrappers'] = [
    'stripe_element' => [],
    'form_element' => [],
  ];

  // The selectors are gonna be looked within the enclosing form only.
  $info['#stripe_selectors'] = [
    'name' => '',
    'first_name' => '',
    'last_name' => '',
    'address_line1' => '',
    'address_line2' => '',
    'address_city' => '',
    'address_state' => '',
    'address_zip' => '',
    'address_country' => '',
  ];
  return $info;
}