view modules/contrib/migrate_tools/src/Form/MigrationGroupAddForm.php @ 9:1fc0ff908d1f

Add another data file
author Chris Cannam
date Mon, 05 Feb 2018 12:34:32 +0000
parents 4c8ae668cc8c
children
line wrap: on
line source
<?php

namespace Drupal\migrate_tools\Form;

use Drupal\Core\Form\FormStateInterface;

/**
 * Class MigrationGroupAddForm.
 *
 * Provides the add form for our migration_group entity.
 *
 * @package Drupal\migrate_tools\Form
 *
 * @ingroup migrate_tools
 */
class MigrationGroupAddForm extends MigrationGroupFormBase {

  /**
   * Returns the actions provided by this form.
   *
   * For our add form, we only need to change the text of the submit button.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   An associative array containing the current state of the form.
   *
   * @return array
   *   An array of supported actions for the current entity form.
   */
  protected function actions(array $form, FormStateInterface $form_state) {
    $actions = parent::actions($form, $form_state);
    $actions['submit']['#value'] = $this->t('Create Migration Group');
    return $actions;
  }

}