You are here

public function MigrateForm::buildForm in Workbench Moderation to Content Moderation 8

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

src/Form/MigrateForm.php, line 48

Class

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

Namespace

Drupal\wbm2cm\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $is_complete = $this->migrate
    ->isComplete();
  if ($is_complete) {
    return $this
      ->buildFormForComplete($form, $form_state);
  }
  else {
    return $this
      ->buildFormForIncomplete($form, $form_state);
  }
}