hook_element_info_alter(array &$info)
Alter the element type information returned from modules.
A module may implement this hook in order to alter the element type defaults defined by a module.
array $info: An associative array with structure identical to that of the return value of \Drupal\Core\Render\ElementInfoManagerInterface::getInfo().
\Drupal\Core\Render\ElementInfoManager
\Drupal\Core\Render\Element\ElementInterface
function hook_element_info_alter(array &$info) { // Decrease the default size of textfields. if (isset($info['textfield']['#size'])) { $info['textfield']['#size'] = 40; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_element_info_alter/8.1.x