You are here

protected function SetCustomize::actions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/shortcut/src/Form/SetCustomize.php \Drupal\shortcut\Form\SetCustomize::actions()

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

@todo Consider introducing a 'preview' action here, since it is used by many entity types.

Overrides EntityForm::actions

File

core/modules/shortcut/src/Form/SetCustomize.php, line 91
Contains \Drupal\shortcut\Form\SetCustomize.

Class

SetCustomize
Builds the shortcut set customize form.

Namespace

Drupal\shortcut\Form

Code

protected function actions(array $form, FormStateInterface $form_state) {

  // Only includes a Save action for the entity, no direct Delete button.
  return array(
    'submit' => array(
      '#type' => 'submit',
      '#value' => t('Save changes'),
      '#access' => (bool) Element::getVisibleChildren($form['shortcuts']['links']),
      '#submit' => array(
        '::submitForm',
        '::save',
      ),
    ),
  );
}