Skip to content

Commit 83120cd

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-48933: use cookies to identify preview version
1 parent 7d1fb53 commit 83120cd

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

lib/internal/Magento/Framework/Url.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,8 @@ public function getUrl($routePath = null, $routeParams = null)
800800
return $routePath;
801801
}
802802

803-
$routeParams = $this->routeParamsPreprocessor->execute($routePath, $routeParams);
803+
$routeParams = $this->routeParamsPreprocessor
804+
->execute($this->_scopeResolver->getAreaCode(), $routePath, $routeParams);
804805

805806
$isCached = true;
806807
$isArray = is_array($routeParams);

lib/internal/Magento/Framework/Url/RouteParamsPreprocessorComposite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ public function __construct(array $routeParamsPreprocessors = [])
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function execute($routePath, $routeParams)
29+
public function execute($areaCode, $routePath, $routeParams)
3030
{
3131
foreach ($this->routeParamsPreprocessors as $preprocessor) {
32-
$routeParams = $preprocessor->execute($routePath, $routeParams);
32+
$routeParams = $preprocessor->execute($areaCode, $routePath, $routeParams);
3333
}
3434

3535
return $routeParams;

lib/internal/Magento/Framework/Url/RouteParamsPreprocessorInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ interface RouteParamsPreprocessorInterface
1313
/**
1414
* Processes route params.
1515
*
16+
* @param string $areaCode
1617
* @param string|null $routePath
1718
* @param array|null $routeParams
1819
* @return array|null
1920
*/
20-
public function execute($routePath, $routeParams);
21+
public function execute($areaCode, $routePath, $routeParams);
2122
}

0 commit comments

Comments
 (0)