You are here

protected function SocialAlbumPostForm::actionsElement in Open Social 10.2.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_album/src/Form/SocialAlbumPostForm.php \Drupal\social_album\Form\SocialAlbumPostForm::actionsElement()
  2. 10.0.x modules/social_features/social_album/src/Form/SocialAlbumPostForm.php \Drupal\social_album\Form\SocialAlbumPostForm::actionsElement()
  3. 10.1.x modules/social_features/social_album/src/Form/SocialAlbumPostForm.php \Drupal\social_album\Form\SocialAlbumPostForm::actionsElement()

Returns the action form element for the current entity form.

Overrides EntityForm::actionsElement

File

modules/social_features/social_album/src/Form/SocialAlbumPostForm.php, line 71

Class

SocialAlbumPostForm
Provides form for creating a post in an album.

Namespace

Drupal\social_album\Form

Code

protected function actionsElement(array $form, FormStateInterface $form_state) {
  $element = parent::actionsElement($form, $form_state);
  if ($this->node) {
    $element['cancel'] = $this->node
      ->toLink($this
      ->t('Go to album'))
      ->toRenderable();
  }
  return $element;
}