You are here

protected function ConfigEntityFormBase::actions in Flags 8

Overrides Drupal\Core\Entity\EntityFormController::actions().

To set the submit button text, we need to override actions().

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: An associative array containing the current state of the form.

Return value

array An array of supported actions for the current entity form.

Overrides EntityForm::actions

2 calls to ConfigEntityFormBase::actions()
CountryMappingAddForm::actions in flags_ui/src/Form/CountryMappingAddForm.php
Returns the actions provided by this form.
CountryMappingEditForm::actions in flags_ui/src/Form/CountryMappingEditForm.php
Returns the actions provided by this form.
2 methods override ConfigEntityFormBase::actions()
CountryMappingAddForm::actions in flags_ui/src/Form/CountryMappingAddForm.php
Returns the actions provided by this form.
CountryMappingEditForm::actions in flags_ui/src/Form/CountryMappingEditForm.php
Returns the actions provided by this form.

File

flags_ui/src/Form/ConfigEntityFormBase.php, line 136

Class

ConfigEntityFormBase
Class ConfigEntityFormBase.

Namespace

Drupal\flags_ui\Form

Code

protected function actions(array $form, FormStateInterface $form_state) {

  // Get the basic actions from the base class.
  $actions = parent::actions($form, $form_state);

  // Change the submit button text.
  $actions['submit']['#value'] = $this
    ->t('Save');

  // Return the result.
  return $actions;
}