function RequiredContextDelete::actions

Same name in other branches
  1. 8.x-3.x src/Form/RequiredContextDelete.php \Drupal\ctools\Form\RequiredContextDelete::actions()

Provides the action buttons for submitting this form.

1 call to RequiredContextDelete::actions()
RequiredContextDelete::buildForm in src/Form/RequiredContextDelete.php
Form constructor.

File

src/Form/RequiredContextDelete.php, line 135

Class

RequiredContextDelete
Base class for adding a required contexts step to your wizard.

Namespace

Drupal\ctools\Form

Code

protected function actions(array $form, FormStateInterface $form_state) {
    return [
        'submit' => [
            '#type' => 'submit',
            '#value' => $this->getConfirmText(),
            '#validate' => [
                [
                    $this,
                    'validate',
                ],
            ],
            '#submit' => [
                [
                    $this,
                    'submitForm',
                ],
            ],
        ],
        'cancel' => ConfirmFormHelper::buildCancelLink($this, $this->getRequest()),
    ];
}