function EntityListBuilder::ensureDestination

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::ensureDestination()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::ensureDestination()
  3. 11.x 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.
1 method overrides EntityListBuilder::ensureDestination()
MenuListBuilder::ensureDestination in core/modules/menu_ui/src/MenuListBuilder.php
Ensures that a destination is present on the given URL.

File

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

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(),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.