Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / migrate_tools / src / Form / MigrationEditForm.php
1 <?php
2
3 namespace Drupal\migrate_tools\Form;
4
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\Core\Url;
7
8 /**
9  * Provides the edit form for our Migration entity.
10  *
11  * @package Drupal\migrate_tools\Form
12  *
13  * @ingroup migrate_tools
14  */
15 class MigrationEditForm extends MigrationFormBase {
16
17   /**
18    * Returns the actions provided by this form.
19    *
20    * For the edit form, we only need to change the text of the submit button.
21    *
22    * @param array $form
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.
26    *
27    * @return array
28    *   An array of supported actions for the current entity form.
29    */
30   public function actions(array $form, FormStateInterface $form_state) {
31     $actions = parent::actions($form, $form_state);
32     $actions['submit']['#value'] = t('Update Migration');
33
34     return $actions;
35   }
36
37   /**
38    * Add group route parameter.
39    *
40    * @param \Drupal\Core\Url $url
41    *   The URL associated with an operation.
42    * @param string $migration_group
43    *   The migration's parent group.
44    */
45   protected function addGroupParameter(Url $url, $migration_group) {
46     $route_parameters = $url->getRouteParameters() + ['migration_group' => $migration_group];
47     $url->setRouteParameters($route_parameters);
48   }
49
50 }