protected function AutocompletionConfigurationFormBase::actions in Search Autocomplete 8
Same name and namespace in other branches
- 2.x src/Form/AutocompletionConfigurationFormBase.php \Drupal\search_autocomplete\Form\AutocompletionConfigurationFormBase::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 AutocompletionConfigurationFormBase::actions()
- AutocompletionConfigurationAddForm::actions in src/
Form/ AutocompletionConfigurationAddForm.php - Returns the actions provided by this form.
- AutocompletionConfigurationEditForm::actions in src/
Form/ AutocompletionConfigurationEditForm.php - Returns the actions provided by this form.
2 methods override AutocompletionConfigurationFormBase::actions()
- AutocompletionConfigurationAddForm::actions in src/
Form/ AutocompletionConfigurationAddForm.php - Returns the actions provided by this form.
- AutocompletionConfigurationEditForm::actions in src/
Form/ AutocompletionConfigurationEditForm.php - Returns the actions provided by this form.
File
- src/
Form/ AutocompletionConfigurationFormBase.php, line 211
Class
- AutocompletionConfigurationFormBase
- Class AutocompletionConfigurationFormBase.
Namespace
Drupal\search_autocomplete\FormCode
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;
}