function RobotFormBase::actions
Same name in other branches
- 4.0.x modules/config_entity_example/src/Form/RobotFormBase.php \Drupal\config_entity_example\Form\RobotFormBase::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 RobotFormBase::actions()
- RobotAddForm::actions in modules/
config_entity_example/ src/ Form/ RobotAddForm.php - Returns the actions provided by this form.
- RobotEditForm::actions in modules/
config_entity_example/ src/ Form/ RobotEditForm.php - Returns the actions provided by this form.
2 methods override RobotFormBase::actions()
- RobotAddForm::actions in modules/
config_entity_example/ src/ Form/ RobotAddForm.php - Returns the actions provided by this form.
- RobotEditForm::actions in modules/
config_entity_example/ src/ Form/ RobotEditForm.php - Returns the actions provided by this form.
File
-
modules/
config_entity_example/ src/ Form/ RobotFormBase.php, line 157
Class
- RobotFormBase
- Class RobotFormBase.
Namespace
Drupal\config_entity_example\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;
}