Loading core/lib/Drupal/Core/Form/FormBuilderInterface.php +3 −7 Original line number Diff line number Diff line Loading @@ -138,15 +138,11 @@ public function rebuildForm($form_id, FormStateInterface &$form_state, $old_form * * For example: * @code * // register a new user * // Set the administrator role to 'content_editor'. * $values['user_admin_role'] = 'content_editor'; * $form_state = new FormState(); * $values['name'] = 'some-user'; * $values['mail'] = 'someuser@example.com'; * $values['pass']['pass1'] = 'password'; * $values['pass']['pass2'] = 'password'; * $values['op'] = t('Create new account'); * $form_state->setValues($values); * \Drupal::formBuilder()->submitForm('user_register_form', $form_state); * \Drupal::formBuilder()->submitForm(RoleSettingsForm::class, $form_state); * @endcode * * @param \Drupal\Core\Form\FormInterface|string $form_arg Loading Loading
core/lib/Drupal/Core/Form/FormBuilderInterface.php +3 −7 Original line number Diff line number Diff line Loading @@ -138,15 +138,11 @@ public function rebuildForm($form_id, FormStateInterface &$form_state, $old_form * * For example: * @code * // register a new user * // Set the administrator role to 'content_editor'. * $values['user_admin_role'] = 'content_editor'; * $form_state = new FormState(); * $values['name'] = 'some-user'; * $values['mail'] = 'someuser@example.com'; * $values['pass']['pass1'] = 'password'; * $values['pass']['pass2'] = 'password'; * $values['op'] = t('Create new account'); * $form_state->setValues($values); * \Drupal::formBuilder()->submitForm('user_register_form', $form_state); * \Drupal::formBuilder()->submitForm(RoleSettingsForm::class, $form_state); * @endcode * * @param \Drupal\Core\Form\FormInterface|string $form_arg Loading