protected function ViewAddFormController::actions

Overrides Drupal\Core\Entity\EntityFormController::actions().

Overrides EntityFormController::actions

File

drupal/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php, line 118
Contains Drupal\views_ui\ViewAddFormController.

Class

ViewAddFormController
Form controller for the Views edit form.

Namespace

Drupal\views_ui

Code

protected function actions(array $form, array &$form_state) {
  $actions = parent::actions($form, $form_state);
  $actions['submit']['#value'] = t('Save & exit');
  $actions['continueAndEdit'] = array(
    '#value' => t('Continue & edit'),
    '#validate' => array(
      array(
        $this,
        'validate',
      ),
    ),
    '#submit' => array(
      array(
        $this,
        'continueAndEdit',
      ),
    ),
  );
  $actions['cancel'] = array(
    '#value' => t('Cancel'),
    '#submit' => array(
      array(
        $this,
        'cancel',
      ),
    ),
    '#limit_validation_errors' => array(),
  );
  return $actions;
}