function IdConflictForm::i18nWarningForm

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php \Drupal\migrate_drupal_ui\Form\IdConflictForm::i18nWarningForm()
  2. 10 core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php \Drupal\migrate_drupal_ui\Form\IdConflictForm::i18nWarningForm()
  3. 11.x core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php \Drupal\migrate_drupal_ui\Form\IdConflictForm::i18nWarningForm()

Build the markup for i18n warnings.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\migrate\Audit\AuditResult[] $conflicts: The failing audit results.

Return value

array The form structure.

1 call to IdConflictForm::i18nWarningForm()
IdConflictForm::buildForm in core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php
Form constructor.

File

core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php, line 143

Class

IdConflictForm
Migrate Upgrade Id Conflict form.

Namespace

Drupal\migrate_drupal_ui\Form

Code

protected function i18nWarningForm(array &$form, array $conflicts) {
    $form['i18n'] = [
        '#title' => $this->t('There is translated content of these types:'),
        '#theme' => 'item_list',
        '#items' => $this->formatConflicts($conflicts),
    ];
    $form['i18n_warning'] = [
        '#type' => 'markup',
        '#markup' => '<p>' . $this->t('It looks like you are migrating translated content from your old site. Possible ID conflicts for translations are not automatically detected in the current version of Drupal. Refer to the <a target="_blank" href=":id-conflicts-handbook">upgrade handbook</a> for instructions on how to avoid ID conflicts with translated content.', [
            ':id-conflicts-handbook' => 'https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#id_conflicts',
        ]) . '</p>',
    ];
    return $form;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.