public function ActionFormControllerBase::submit

Implements \Drupal\Core\Entity\EntityFormControllerInterface::submit().

This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be passed to the following submit handlers. At this point of the form workflow the entity is validated and the form state can be updated, this way the subsequently invoked handlers can retrieve a regular entity object to act on.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: A reference to a keyed array containing the current state of the form.

Overrides EntityFormController::submit

File

drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php, line 140
Contains Drupal\action\ActionEditFormController.

Class

ActionFormControllerBase
Provides a base form controller for action forms.

Namespace

Drupal\action

Code

public function submit(array $form, array &$form_state) {
  parent::submit($form, $form_state);
  if ($this->plugin instanceof ConfigurableActionInterface) {
    $this->plugin
      ->submit($form, $form_state);
  }
  return $this->entity;
}