public function RgElement::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 ElementInterface::getInfo
File
- src/
Element/ RgElement.php, line 16
Class
- RgElement
- Plugin annotation @FormElement("brazilian_ids_rg");
Namespace
Drupal\brazilian_ids\ElementCode
public function getInfo() {
$class = get_class($this);
return [
'#title' => '',
'#description' => '',
'#required' => FALSE,
'#default_value' => [
'number' => NULL,
'agency' => NULL,
'state' => NULL,
],
'#number_only' => FALSE,
'#clean_number' => FALSE,
'#state_options' => [
'AC' => 'AC',
'AL' => 'AL',
'AM' => 'AM',
'AP' => 'AP',
'BA' => 'BA',
'CE' => 'CE',
'DF' => 'DF',
'ES' => 'ES',
'GO' => 'GO',
'MA' => 'MA',
'MG' => 'MG',
'MS' => 'MS',
'MT' => 'MT',
'PA' => 'PA',
'PB' => 'PB',
'PE' => 'PE',
'PI' => 'PI',
'PR' => 'PR',
'RJ' => 'RJ',
'RN' => 'RN',
'RO' => 'RO',
'RR' => 'RR',
'RS' => 'RS',
'SC' => 'SC',
'SE' => 'SE',
'SP' => 'SP',
'TO' => 'TO',
],
'#process' => [
[
$class,
'processElement',
],
],
'#element_validate' => [
[
$class,
'validateElement',
],
],
];
}