22 private $storeManager;
38 private function stripPathBeforeStorecode($pathInfo)
40 $pathParts = explode(
'/', trim($pathInfo,
'/'));
41 array_shift($pathParts);
42 $path =
'/' . implode(
'/', $pathParts);
43 return explode(
'/', ltrim(
$path,
'/'), 2);
55 $pathParts = $this->stripPathBeforeStorecode($pathInfo);
57 $stores = $this->storeManager->getStores(
false,
true);
59 $this->storeManager->setCurrentStore(
$storeCode);
60 $path =
'/' . (isset($pathParts[1]) ? $pathParts[1] :
'');
63 $path =
'/' . (isset($pathParts[1]) ? $pathParts[1] :
'');
65 $path =
'/' . implode(
'/', $pathParts);
elseif(isset( $params[ 'redirect_parent']))
__construct(\Magento\Store\Model\StoreManagerInterface $storeManager)