You are here

public function PhoneInternationalElement::getInfo in International Phone 3.x

Same name and namespace in other branches
  1. 8.2 src/Element/PhoneInternationalElement.php \Drupal\phone_international\Element\PhoneInternationalElement::getInfo()
  2. 8 src/Element/PhoneInternationalElement.php \Drupal\phone_international\Element\PhoneInternationalElement::getInfo()

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/PhoneInternationalElement.php, line 71

Class

PhoneInternationalElement
Provides a phone_international form.

Namespace

Drupal\phone_international\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#process' => [
      [
        $class,
        'processInternationalPhone',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateNumber',
      ],
    ],
    '#theme_wrappers' => [
      'form_element',
    ],
    '#tree' => TRUE,
    '#country' => '',
    '#geolocation' => 0,
    '#exclude' => [],
    '#preferred' => [],
  ];
}