You are here

protected function ProductVariationListBuilder::ensureDestination in Commerce Core 8.2

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.

Overrides EntityListBuilder::ensureDestination

1 call to ProductVariationListBuilder::ensureDestination()
ProductVariationListBuilder::getDefaultOperations in modules/product/src/ProductVariationListBuilder.php
Gets this list's default operations.

File

modules/product/src/ProductVariationListBuilder.php, line 268

Class

ProductVariationListBuilder
Defines the list builder for product variations.

Namespace

Drupal\commerce_product

Code

protected function ensureDestination(Url $url) {
  return $url
    ->mergeOptions([
    'query' => [
      'destination' => Url::fromRoute('<current>')
        ->toString(),
    ],
  ]);
}