You are here

public function PaymentLineItemsInput::getInfo in Payment 8.2

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/PaymentLineItemsInput.php, line 79

Class

PaymentLineItemsInput
Provides a payment line items configuration element.

Namespace

Drupal\payment\Element

Code

public function getInfo() {
  $plugin_id = $this
    ->getPluginId();
  return array(
    // The number of values this element allows, which must be at least as
    // many as the number of line items in the default value. For unlimited
    // values, use
    // \Drupal\payment\Element\PaymentLineItemsInput::CARDINALITY_UNLIMITED.
    '#cardinality' => self::CARDINALITY_UNLIMITED,
    // An array of
    // \Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface
    // objects (required).
    '#default_value' => [],
    // A \Drupal\payment\Entity\PaymentInterface object (optional).
    '#payment' => NULL,
    '#process' => [
      [
        get_class($this),
        'instantiate#process#' . $plugin_id,
      ],
    ],
  );
}