You are here

protected function SlideGroupBaseForm::actions in Drupal Slider 8

Same name and namespace in other branches
  1. 8.2 src/Form/SlideGroupBaseForm.php \Drupal\drupal_slider\Form\SlideGroupBaseForm::actions()

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 SlideGroupBaseForm::actions()
SlideGroupAddForm::actions in src/Form/SlideGroupAddForm.php
Returns the actions provided by this form.
SlideGroupEditForm::actions in src/Form/SlideGroupEditForm.php
Returns the actions provided by this form.
2 methods override SlideGroupBaseForm::actions()
SlideGroupAddForm::actions in src/Form/SlideGroupAddForm.php
Returns the actions provided by this form.
SlideGroupEditForm::actions in src/Form/SlideGroupEditForm.php
Returns the actions provided by this form.

File

src/Form/SlideGroupBaseForm.php, line 161

Class

SlideGroupBaseForm
Class SlideGroupBaseForm.

Namespace

Drupal\drupal_slider\Form

Code

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

  // Get the basic actins 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;
}