You are here

public function GroupContentDeleteForm::getCancelURL in Group 2.0.x

Same name and namespace in other branches
  1. 8 src/Entity/Form/GroupContentDeleteForm.php \Drupal\group\Entity\Form\GroupContentDeleteForm::getCancelURL()

File

src/Entity/Form/GroupContentDeleteForm.php, line 36

Class

GroupContentDeleteForm
Provides a form for deleting a group content entity.

Namespace

Drupal\group\Entity\Form

Code

public function getCancelURL() {

  /** @var \Drupal\group\Entity\GroupContent $group_content */
  $group_content = $this
    ->getEntity();
  $group = $group_content
    ->getGroup();
  $route_params = [
    'group' => $group
      ->id(),
    'group_content' => $group_content
      ->id(),
  ];
  return new Url('entity.group_content.canonical', $route_params);
}