protected function EntityFormController::actions

Returns an array of supported actions for the current entity form.

8 calls to EntityFormController::actions()
CommentFormController::actions in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::actions().
EntityFormController::actionsElement in drupal/core/lib/Drupal/Core/Entity/EntityFormController.php
Returns the action form element for the current entity form.
NodeFormController::actions in drupal/core/modules/node/lib/Drupal/node/NodeFormController.php
Overrides Drupal\Core\Entity\EntityFormController::actions().
ProfileFormController::actions in drupal/core/modules/user/lib/Drupal/user/ProfileFormController.php
Overrides Drupal\Core\Entity\EntityFormController::actions().
RegisterFormController::actions in drupal/core/modules/user/lib/Drupal/user/RegisterFormController.php
Overrides Drupal\Core\Entity\EntityFormController::actions().

... See full list

10 methods override EntityFormController::actions()

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 128
Definition of Drupal\Core\Entity\EntityFormController.

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

protected function actions(array $form, array &$form_state) {
  return array(
    // @todo Rename the action key from submit to save.
    'submit' => array(
      '#value' => t('Save'),
      '#validate' => array(
        array(
          $this,
          'validate',
        ),
      ),
      '#submit' => array(
        array(
          $this,
          'submit',
        ),
        array(
          $this,
          'save',
        ),
      ),
    ),
    'delete' => array(
      '#value' => t('Delete'),
      // No need to validate the form when deleting the entity.
      '#submit' => array(
        array(
          $this,
          'delete',
        ),
      ),
    ),
  );
}