You are here

public function Country::getInfo in Address 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 ElementInterface::getInfo

File

src/Element/Country.php, line 27

Class

Country
Provides a country form element.

Namespace

Drupal\address\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    // List of country codes. If empty, all countries will be available.
    '#available_countries' => [],
    '#input' => TRUE,
    '#multiple' => FALSE,
    '#default_value' => NULL,
    '#process' => [
      [
        $class,
        'processCountry',
      ],
      [
        $class,
        'processGroup',
      ],
    ],
    '#theme_wrappers' => [
      'container',
    ],
  ];
}