You are here

public function StripeBase::getInfo in Stripe 2.x

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 ElementInterface::getInfo

File

src/Element/StripeBase.php, line 26

Class

StripeBase
Provides the base for our Stripe elements

Namespace

Drupal\stripe\Element

Code

public function getInfo() {
  $class = get_class($this);
  $info = [
    '#process' => [
      [
        $class,
        'processStripe',
      ],
    ],
    '#theme_wrappers' => [
      'form_element' => [],
    ],
    '#stripe_submit_selector' => [],
    '#stripe_amount' => 100,
    '#stripe_label' => 'Total',
    '#stripe_currency' => 'usd',
    '#stripe_country' => 'US',
    '#stripe_paymentintent' => [],
    '#stripe_shared' => TRUE,
  ];
  return $info;
}