function FormTestHooks::formUserRegisterFormAlter
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/form_test/src/Hook/FormTestHooks.php \Drupal\form_test\Hook\FormTestHooks::formUserRegisterFormAlter()
Implements hook_form_FORM_ID_alter() for the registration form.
Attributes
#[Hook('form_user_register_form_alter')]
File
-
core/
modules/ system/ tests/ modules/ form_test/ src/ Hook/ FormTestHooks.php, line 56
Class
- FormTestHooks
- Hook implementations for form_test.
Namespace
Drupal\form_test\HookCode
public function formUserRegisterFormAlter(&$form, FormStateInterface $form_state) : void {
$form['test_rebuild'] = [
'#type' => 'submit',
'#value' => $this->t('Rebuild'),
'#submit' => [
[
Callbacks::class,
'userRegisterFormRebuild',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.