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