function ElementInfoTestHooks::elementInfoAlter
Implements hook_element_info_alter().
File
-
core/
modules/ system/ tests/ modules/ element_info_test/ src/ Hook/ ElementInfoTestHooks.php, line 18
Class
- ElementInfoTestHooks
- Hook implementations for element_info_test.
Namespace
Drupal\element_info_test\HookCode
public function elementInfoAlter(array &$info) : void {
$info['number'] += [
'#pre_render' => [],
];
/* @see \Drupal\KernelTests\Core\Render\Element\WeightTest::testProcessWeightSelectMax() */
$info['number']['#pre_render'][] = [
ElementInfoTestNumberBuilder::class,
'preRender',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.