function SetCustomize::actions

Same name in other branches
  1. 9 core/modules/shortcut/src/Form/SetCustomize.php \Drupal\shortcut\Form\SetCustomize::actions()
  2. 10 core/modules/shortcut/src/Form/SetCustomize.php \Drupal\shortcut\Form\SetCustomize::actions()
  3. 11.x core/modules/shortcut/src/Form/SetCustomize.php \Drupal\shortcut\Form\SetCustomize::actions()

Overrides EntityForm::actions

File

core/modules/shortcut/src/Form/SetCustomize.php, line 89

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 [
        'submit' => [
            '#type' => 'submit',
            '#value' => t('Save'),
            '#access' => (bool) Element::getVisibleChildren($form['shortcuts']['links']),
            '#submit' => [
                '::submitForm',
                '::save',
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.