'submit', '#value' => $this->t('Submit'), ]; return $form; } /** * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { foreach ($form_state->getValues() as $key => $value) { // @TODO: Validate fields. } parent::validateForm($form, $form_state); } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $batch = [ 'title' => $this->t('Bringing over Title Body Field Collections...'), 'operations' => [ [ 'sample_migration_title_body_paragraphs', [ ] ] ], 'init_message' => $this->t('Loading nodes...'), 'progress_message' => $this->t('Processed @current out of @total'), 'finished' => $this->t('sample_migration_title_body_paragraphs_finished') ]; batch_set($batch); } }