restartUpgradeForm example


  public function buildForm(array $form, FormStateInterface $form_state) {
    // Get all the data needed for this form.     $version = $this->store->get('version');
    $this->migrations = $this->store->get('migrations');
    // Fetch the source system data at the first opportunity.     $this->systemData = $this->store->get('system_data');

    // If data is missing or this is the wrong step, start over.     if (!$version || !$this->migrations || !$this->systemData ||
      ($this->store->get('step') != 'review')) {
      return $this->restartUpgradeForm();
    }

    $form = parent::buildForm($form$form_state);
    $form['#title'] = $this->t('What will be upgraded?');

    $migrations = $this->migrationPluginManager->createInstances(array_keys($this->store->get('migrations')));

    // Get the upgrade states for the source modules.     $display = $this->migrationState->getUpgradeStates($version$this->systemData, $migrations);

    // Missing migrations.


  /** * {@inheritdoc} */
  public function buildForm(array $form, FormStateInterface $form_state) {
    // Get all the data needed for this form.     $migrations = $this->store->get('migrations');

    // If data is missing or this is the wrong step, start over.     if (!$migrations || ($this->store->get('step') != 'idconflict')) {
      return $this->restartUpgradeForm();
    }

    $migration_ids = array_keys($migrations);
    // Check if there are conflicts. If none, just skip this form!     $migrations = $this->migrationPluginManager->createInstances($migration_ids);

    $translated_content_conflicts = $content_conflicts = [];

    $results = (new IdAuditor())->auditMultiple($migrations);

    /** @var \Drupal\migrate\Audit\AuditResult $result */
    


  /** * {@inheritdoc} */
  public function buildForm(array $form, FormStateInterface $form_state) {
    // Get all the data needed for this form.     $date_performed = $this->state->get('migrate_drupal_ui.performed');

    // If data is missing or this is the wrong step, start over.     if (!$date_performed || $this->store->get('step') != 'incremental') {
      return $this->restartUpgradeForm();
    }

    $form = parent::buildForm($form$form_state);
    $form['#title'] = $this->t('Upgrade');

    // @todo Add back support for rollbacks.     // https://www.drupal.org/node/2687849     $form['upgrade_option_item'] = [
      '#type' => 'item',
      '#prefix' => $this->t('An upgrade has already been performed on this site. To perform a new migration, create a clean and empty new install of Drupal @version. Rollbacks are not yet supported through the user interface. For more information, see the <a href=":url">upgrading handbook</a>.', [
        '@version' => $this->destinationSiteVersion,
        

  public function getFormId() {
    return 'migrate_drupal_ui_credential_form';
  }

  /** * {@inheritdoc} */
  public function buildForm(array $form, FormStateInterface $form_state) {
    if ($this->store->get('step') != 'credential') {
      return $this->restartUpgradeForm();
    }

    $form = parent::buildForm($form$form_state);
    $form['actions']['submit']['#value'] = $this->t('Review upgrade');

    $form['#title'] = $this->t('Drupal Upgrade');

    $drivers = $this->getDatabaseTypes();
    $drivers_keys = array_keys($drivers);
    $default_driver = current($drivers_keys);

    
Home | Imprint | This part of the site doesn't use cookies.