public function AuthorForm::submitForm in WordPress Migrate 8.3
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- wordpress_migrate_ui/
src/ Form/ AuthorForm.php, line 68
Class
- AuthorForm
- Simple wizard step form.
Namespace
Drupal\wordpress_migrate_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$cached_values = $form_state
->getTemporaryValue('wizard');
if (!$form_state
->getValue('perform_user_migration')) {
$account = user_load_by_name($form_state
->getValue('default_author'));
if ($account) {
$cached_values['default_author'] = $form_state
->getValue('default_author');
}
}
$form_state
->setTemporaryValue('wizard', $cached_values);
}