You are here

protected function IdConflictForm::conflictsForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php \Drupal\migrate_drupal_ui\Form\IdConflictForm::conflictsForm()

Build the markup for conflict 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::conflictsForm()
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 88

Class

IdConflictForm
Migrate Upgrade Id Conflict form.

Namespace

Drupal\migrate_drupal_ui\Form

Code

protected function conflictsForm(array &$form, array $conflicts) {
  $form['conflicts'] = [
    '#title' => $this
      ->t('There is conflicting content of these types:'),
    '#theme' => 'item_list',
    '#items' => $this
      ->formatConflicts($conflicts),
  ];
  $form['warning'] = [
    '#type' => 'markup',
    '#markup' => '<p>' . $this
      ->t('It looks like you have content on your new site which <strong>may be overwritten</strong> if you continue to run this upgrade. The upgrade should be performed on a clean Drupal @version installation. For more information see the <a target="_blank" href=":id-conflicts-handbook">upgrade handbook</a>.', [
      '@version' => $this->destinationSiteVersion,
      ':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;
}