protected function EntityFormController::actions

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

15 calls to EntityFormController::actions()
ActionFormControllerBase::actions in drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
Returns an array of supported actions for the current entity form.
BlockFormController::actions in drupal/core/modules/block/lib/Drupal/block/BlockFormController.php
Overrides \Drupal\Core\Entity\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.
MenuFormController::actions in drupal/core/modules/menu/lib/Drupal/menu/MenuFormController.php
Overrides Drupal\Core\Entity\EntityFormController::actions().

... See full list

17 methods override EntityFormController::actions()
ActionFormControllerBase::actions in drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
Returns an array of supported actions for the current entity form.
BlockFormController::actions in drupal/core/modules/block/lib/Drupal/block/BlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::actions().
CommentFormController::actions in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::actions().
MenuFormController::actions in drupal/core/modules/menu/lib/Drupal/menu/MenuFormController.php
Overrides Drupal\Core\Entity\EntityFormController::actions().
MenuLinkFormController::actions in drupal/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php
Overrides EntityFormController::actions().

... See full list

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 215
Contains \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',
        ),
      ),
    ),
  );
}