function SetCustomize::actions

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

Overrides EntityForm::actions

File

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

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' => $this->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.