You are here

public function PaymentReferenceBase::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/PaymentReferenceBase.php, line 149

Class

PaymentReferenceBase
Provides a base for payment reference elements.

Namespace

Drupal\payment\Element

Code

public function getInfo() {
  $plugin_id = $this
    ->getPluginId();
  return array(
    // The ID of a payment as the (default) value. Changing the value is not
    // supported, so #default_value must be NULL if the user should be allowed
    // to select/add a payment.
    '#default_value' => NULL,
    // An array with IDs of the payment methods the payer is allowed to pay the
    // payment with, or NULL to allow all.
    '#limit_allowed_plugin_ids' => NULL,
    // The ID of the plugin selector plugin to use.
    '#plugin_selector_id' => NULL,
    '#process' => [
      [
        get_class($this),
        'instantiate#process#' . $plugin_id,
      ],
    ],
    // The payment that must be made if none are available in the queue yet. It
    // must be an instance of \Drupal\payment\Entity\PaymentInterface.
    '#prototype_payment' => NULL,
    // The ID of the queue category the element is used for. See
    // \Drupal\payment\QueueInterface::loadPaymentIds().
    '#queue_category_id' => NULL,
    // The ID of the account that must own the payment. See
    // \Drupal\payment\QueueInterface::loadPaymentIds().
    '#queue_owner_id' => NULL,
  );
}