You are here

public function PluginConfiguration::getInfo in Commerce Core 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/PluginConfiguration.php, line 36

Class

PluginConfiguration
Provides a form element for configuring plugins.

Namespace

Drupal\commerce\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#tree' => TRUE,
    '#plugin_type' => NULL,
    '#plugin_id' => NULL,
    '#enforce_unique_parents' => TRUE,
    '#default_value' => [],
    '#process' => [
      [
        $class,
        'attachElementSubmit',
      ],
      [
        $class,
        'processPluginConfiguration',
      ],
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateElementSubmit',
      ],
      [
        $class,
        'validatePluginConfiguration',
      ],
    ],
    '#commerce_element_submit' => [
      [
        $class,
        'submitPluginConfiguration',
      ],
    ],
    '#theme_wrappers' => [
      'container',
    ],
  ];
}