You are here

protected function GroupSubscribeForm::actions in Organic groups 8

Overrides EntityForm::actions

See also

\Drupal\Core\Entity\EntityConfirmFormBase::actions

File

src/Form/GroupSubscribeForm.php, line 171

Class

GroupSubscribeForm
Provides a form for subscribing to a group.

Namespace

Drupal\og\Form

Code

protected function actions(array $form, FormStateInterface $form_state) {
  $actions = parent::actions($form, $form_state);
  $actions['submit']['#value'] = $this
    ->getConfirmText();
  $actions['cancel'] = [
    '#type' => 'link',
    '#title' => $this
      ->t('Cancel'),
    '#attributes' => [
      'class' => [
        'button',
      ],
    ],
    '#url' => $this
      ->getCancelUrl(),
    '#cache' => [
      'contexts' => [
        'url.query_args:destination',
      ],
    ],
  ];
  return $actions;
}