You are here

public function CpfCnpjElement::getInfo in Brazilian IDs 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 CpfCnpjBase::getInfo

File

src/Element/CpfCnpjElement.php, line 15

Class

CpfCnpjElement
Plugin annotation @FormElement("brazilian_ids_cpf_cnpj");

Namespace

Drupal\brazilian_ids\Element

Code

public function getInfo() {
  $info = parent::getInfo();
  $info['#maxlength'] = 18;

  // Mask settings are added during element processing to avoid accidental
  // overrides.
  $info['#process'][] = [
    __CLASS__,
    'processMask',
  ];
  return $info;
}