DeleteForm::getCancelUrl

public DeleteForm::getCancelUrl()

Returns the route to go to if the user cancels the action.

Return value

\Drupal\Core\Url A URL object.

Overrides ContentEntityDeleteForm::getCancelUrl

File

core/modules/comment/src/Form/DeleteForm.php, line 15

Class

DeleteForm
Provides the comment delete confirmation form.

Namespace

Drupal\comment\Form

Code

public function getCancelUrl() {
  // Point to the entity of which this comment is a reply.
  return $this->entity->get('entity_id')->entity->urlInfo();
}
doc_Drupal
2016-10-29 09:02:08
Comments
Leave a Comment

Please login to continue.