diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index f92b93e..810e02a 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -71,7 +71,7 @@ class MigrateUpgradeForm extends ConfirmFormBase { /** * List of modules that do not need an upgrade path. */ - protected $noUpgradePath = [ + protected $noUpgradePaths = [ '6' => [ 'blog', 'color', @@ -209,7 +209,7 @@ public function buildOverviewForm(array $form, FormStateInterface $form_state) { $form['#title'] = $this->t('Upgrade'); // Add the no upgrade path array to the form state so it can be altered. - $form_state->set('no_upgrade_path', $this->noUpgradePath); + $form_state->set('no_upgrade_paths', $this->noUpgradePaths); if ($date_performed = $this->state->get('migrate_drupal_ui.performed')) { // @todo Add back support for rollbacks and incremental migrations. @@ -724,10 +724,10 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { // Add source_module and destination_module for modules that do not need an // upgrade path and are enabled on the source site. - $no_upgrade_path = $form_state->get('no_upgrade_path'); - foreach ($no_upgrade_path[$version] as $module) { - if ($system_data['module'][$module]['status']) { - $table_data[$module]['core'][$module] = $module; + $no_upgrade_paths = $form_state->get('no_upgrade_paths'); + foreach ($no_upgrade_paths[$version] as $no_upgrade_path) { + if ($system_data['module'][$no_upgrade_path]['status']) { + $table_data[$no_upgrade_path]['core'][$no_upgrade_path] = $no_upgrade_path; } } diff --git a/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module b/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module index 499a0db..7168cdf 100644 --- a/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module +++ b/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module @@ -11,8 +11,8 @@ * Implements hook_form_FORM_ID_alter(). */ function upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(&$form, FormStateInterface $form_state, $form_id) { - $no_upgrade_path = $form_state->get('no_upgrade_path'); - $no_upgrade_path['6'][] = 'event'; - $no_upgrade_path['7'][] = 'book'; - $form_state->set('no_upgrade_path', $no_upgrade_path); + $no_upgrade_paths = $form_state->get('no_upgrade_paths'); + $no_upgrade_paths['6'][] = 'event'; + $no_upgrade_paths['7'][] = 'book'; + $form_state->set('no_upgrade_path', $no_upgrade_paths); }