public function MigrationExecuteForm::buildForm in Migrate Tools 8.5
Same name and namespace in other branches
- 8.4 src/Form/MigrationExecuteForm.php \Drupal\migrate_tools\Form\MigrationExecuteForm::buildForm()
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/ MigrationExecuteForm.php, line 59
Class
- MigrationExecuteForm
- This form is specifically for configuring process pipelines.
Namespace
Drupal\migrate_tools\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = $form ?: [];
/** @var \Drupal\migrate_plus\Entity\MigrationInterface $migration */
$migration = $this
->getRouteMatch()
->getParameter('migration');
$form['#title'] = $this
->t('Execute migration %label', [
'%label' => $migration
->label(),
]);
$form = $this
->buildFormOperations($form, $form_state);
$form = $this
->buildFormOptions($form, $form_state);
$form['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Execute'),
];
return $form;
}