You are here

public function ReviewForm::buildForm in WordPress Migrate 8.3

Form constructor.

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.

Overrides FormInterface::buildForm

File

wordpress_migrate_ui/src/Form/ReviewForm.php, line 26

Class

ReviewForm
Simple wizard step form.

Namespace

Drupal\wordpress_migrate_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {

  // @todo: Display details of the configuration.
  // @link: https://www.drupal.org/node/2742289
  $form['description'] = [
    '#markup' => $this
      ->t('Please review your migration configuration. When you submit this form, migration processes will be created and you will be left at the migration dashboard.'),
  ];

  // @todo: Derive default values from blog title.
  // @link https://www.drupal.org/node/2742287
  $form['group_id'] = [
    '#type' => 'machine_name',
    '#max_length' => 64,
    '#title' => $this
      ->t('ID to assign to the generated migration group'),
    '#default_value' => 'my_wordpress',
  ];
  $form['prefix'] = [
    '#type' => 'machine_name',
    '#max_length' => 64 - strlen('wordpress_content_page'),
    '#title' => $this
      ->t('ID to prepend to each generated migration'),
    '#default_value' => 'my_',
  ];
  return $form;
}