function RobotAddForm::actions

Same name in other branches
  1. 4.0.x modules/config_entity_example/src/Form/RobotAddForm.php \Drupal\config_entity_example\Form\RobotAddForm::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 RobotFormBase::actions

File

modules/config_entity_example/src/Form/RobotAddForm.php, line 29

Class

RobotAddForm
Class RobotAddForm.

Namespace

Drupal\config_entity_example\Form

Code

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