You are here

protected function SlideAddForm::actions in Drupal Slider 8

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

Returns the actions provided by this form.

For our add form, we only need to change the text of the submit button.

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 SlideBaseForm::actions

File

src/Form/SlideAddForm.php, line 142

Class

SlideAddForm
Class SlideAddForm.

Namespace

Drupal\drupal_slider\Form

Code

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