3 namespace Drupal\migrate_tools\Form;
5 use Drupal\Core\Form\FormStateInterface;
9 * Provides the edit form for our Migration entity.
11 * @package Drupal\migrate_tools\Form
13 * @ingroup migrate_tools
15 class MigrationEditForm extends MigrationFormBase {
18 * Returns the actions provided by this form.
20 * For the edit form, we only need to change the text of the submit button.
23 * An associative array containing the structure of the form.
24 * @param \Drupal\Core\Form\FormStateInterface $form_state
25 * An associative array containing the current state of the form.
28 * An array of supported actions for the current entity form.
30 public function actions(array $form, FormStateInterface $form_state) {
31 $actions = parent::actions($form, $form_state);
32 $actions['submit']['#value'] = t('Update Migration');
38 * Add group route parameter.
40 * @param \Drupal\Core\Url $url
41 * The URL associated with an operation.
42 * @param string $migration_group
43 * The migration's parent group.
45 protected function addGroupParameter(Url $url, $migration_group) {
46 $route_parameters = $url->getRouteParameters() + ['migration_group' => $migration_group];
47 $url->setRouteParameters($route_parameters);