You are here

protected function MigrateForm::buildFormForIncomplete in Workbench Moderation to Content Moderation 8

Build the form for when the migration is NOT complete.

Parameters

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

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

1 call to MigrateForm::buildFormForIncomplete()
MigrateForm::buildForm in src/Form/MigrateForm.php
Form constructor.

File

src/Form/MigrateForm.php, line 90

Class

MigrateForm
A form to trigger batch processing if state is valid.

Namespace

Drupal\wbm2cm\Form

Code

protected function buildFormForIncomplete(array $form, FormStateInterface $form_state) {
  $form['info'] = [
    '#type' => 'html_tag',
    '#tag' => 'div',
    // @todo turn the URL into a link
    '#value' => 'This migration is experimental and is designed for Drupal 8.4 alpha, migrating from Workbench Moderation to Content Moderation. There are known issues and many untested scenarios. For more details, see https://www.drupal.org/node/2897870.',
  ];
  $form['actions']['#type'] = 'actions';
  $form['actions']['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Migrate'),
    '#button_type' => 'primary',
  ];
  return $form;
}