state = $state; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('state'), $container->get('tempstore.private') ); } /** * {@inheritdoc} */ public function getFormId() { return 'migrate_drupal_ui_overview_form'; } /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { // If an upgrade has already been performed, redirect to the incremental // form. if ($this->state->get('migrate_drupal_ui.performed')) { $this->store->set('step', 'incremental'); return $this->redirect('migrate_drupal_ui.upgrade_incremental'); } $form = parent::buildForm($form, $form_state); $form['#title'] = $this->t('Upgrade'); $form['info_header'] = [ '#markup' => '
' . $this->t('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8. See the Drupal site upgrades handbook for more information.', [ ':url' => 'https://www.drupal.org/upgrade/migrate', ]), ]; $form['legend']['#markup'] = ''; $form['legend']['#markup'] .= '
' . $this->t('The upgrade can take a long time. It is better to upgrade from a local copy of your site instead of directly from your live site.'), ]; return $form; } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->store->set('step', 'credential'); $form_state->setRedirect('migrate_drupal_ui.upgrade_credential'); } /** * {@inheritdoc} */ public function getConfirmText() { return $this->t('Continue'); } }