You are here

protected function EntityListBuilder::ensureDestination in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::ensureDestination()

Ensures that a destination is present on the given URL.

Parameters

\Drupal\Core\Url $url: The URL object to which the destination should be added.

Return value

\Drupal\Core\Url The updated URL object.

2 calls to EntityListBuilder::ensureDestination()
ConfigEntityListBuilder::getDefaultOperations in core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php
Gets this list's default operations.
EntityListBuilder::getDefaultOperations in core/lib/Drupal/Core/Entity/EntityListBuilder.php
Gets this list's default operations.

File

core/lib/Drupal/Core/Entity/EntityListBuilder.php, line 247

Class

EntityListBuilder
Defines a generic implementation to build a listing of entities.

Namespace

Drupal\Core\Entity

Code

protected function ensureDestination(Url $url) {
  return $url
    ->mergeOptions([
    'query' => $this
      ->getRedirectDestination()
      ->getAsArray(),
  ]);
}