You are here

protected function AutobanFormBase::actions in Automatic IP ban (Autoban) 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 AutobanFormBase::actions()
AutobanAddForm::actions in src/Form/AutobanAddForm.php
Returns the actions provided by this form.
AutobanEditForm::actions in src/Form/AutobanEditForm.php
Returns the actions provided by this form.
2 methods override AutobanFormBase::actions()
AutobanAddForm::actions in src/Form/AutobanAddForm.php
Returns the actions provided by this form.
AutobanEditForm::actions in src/Form/AutobanEditForm.php
Returns the actions provided by this form.

File

src/Form/AutobanFormBase.php, line 333
Class AutobanFormBase.

Class

AutobanFormBase
Autoban base form for add and edit.

Namespace

Drupal\autoban\Form

Code

protected function actions(array $form, FormStateInterface $form_state) {
  $actions = parent::actions($form, $form_state);
  $actions['submit']['#value'] = $this
    ->t('Save');
  return $actions;
}