public function Cpf::getInfo in CPF 8
Same name and namespace in other branches
- 8.2 src/Element/Cpf.php \Drupal\cpf\Element\Cpf::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/ Cpf.php, line 49
Class
- Cpf
- Provides a form input element for entering an CPF number.
Namespace
Drupal\cpf\ElementCode
public function getInfo() {
$class = get_class($this);
return [
'#input' => TRUE,
'#size' => 60,
'#maxlength' => self::MAX_LENGTH_CANONICAL_MASK,
'#autocomplete_route_name' => FALSE,
'#description' => '',
'#mask' => TRUE,
'#process' => [
[
$class,
'processAutocomplete',
],
[
$class,
'processAjaxForm',
],
[
$class,
'processPattern',
],
],
'#element_validate' => [
[
$class,
'validateCpf',
],
],
'#pre_render' => [
[
$class,
'preRenderCpf',
],
],
'#theme' => 'input__cpf',
'#theme_wrappers' => [
'form_element',
],
];
}