-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #18814: Replace erroneous usage of unsData method (by @t-richards) - #19061: Fixed Product Tax total on PDF for 2.3, Reference of PL #18649 (by @maheshWebkul721) - #18816: Issue #18150 fixed: Reference Pull Request of #18815 for 2.3-develop (by @maheshWebkul721) - #15961: 14294 - Fixes 'back' functionality after switching a store view. (by @Mobecls) Fixed GitHub Issues: - #18617: Missing Fixed Product Tax total on PDF (reported by @Detzler) has been fixed in #19061 by @maheshWebkul721 in 2.3-develop branch Related commits: 1. 73ff7cb - #18150: Backups error from User Roles Permission 2.2.6 (reported by @andy17612) has been fixed in #18816 by @maheshWebkul721 in 2.3-develop branch Related commits: 1. 3d0d8b7 - #14294: Since MagentoCE2.1.11, after swithing store view, ___store=xx is added to url. Breaks 'back' functionality. (reported by @bobemoe) has been fixed in #15961 by @Mobecls in 2.3-develop branch Related commits: 1. 3feda05
- Loading branch information
Showing
10 changed files
with
111 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Magento\Store\ViewModel; | ||
|
||
use Magento\Framework\App\ActionInterface; | ||
use Magento\Framework\Url\EncoderInterface; | ||
use Magento\Framework\UrlInterface; | ||
use Magento\Store\Model\Store; | ||
use Magento\Store\Model\StoreManagerInterface; | ||
|
||
/** | ||
* Provides target store redirect url. | ||
*/ | ||
class SwitcherUrlProvider implements \Magento\Framework\View\Element\Block\ArgumentInterface | ||
{ | ||
/** | ||
* @var EncoderInterface | ||
*/ | ||
private $encoder; | ||
|
||
/** | ||
* @var StoreManagerInterface | ||
*/ | ||
private $storeManager; | ||
|
||
/** | ||
* @var UrlInterface | ||
*/ | ||
private $urlBuilder; | ||
|
||
/** | ||
* @param EncoderInterface $encoder | ||
* @param StoreManagerInterface $storeManager | ||
* @param UrlInterface $urlBuilder | ||
*/ | ||
public function __construct( | ||
EncoderInterface $encoder, | ||
StoreManagerInterface $storeManager, | ||
UrlInterface $urlBuilder | ||
) { | ||
$this->encoder = $encoder; | ||
$this->storeManager = $storeManager; | ||
$this->urlBuilder = $urlBuilder; | ||
} | ||
|
||
/** | ||
* Returns target store redirect url. | ||
* | ||
* @param Store $store | ||
* @return string | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
*/ | ||
public function getTargetStoreRedirectUrl(Store $store): string | ||
{ | ||
return $this->urlBuilder->getUrl( | ||
'stores/store/redirect', | ||
[ | ||
'___store' => $store->getCode(), | ||
'___from_store' => $this->storeManager->getStore()->getCode(), | ||
ActionInterface::PARAM_NAME_URL_ENCODED => $this->encoder->encode( | ||
$store->getCurrentUrl(false) | ||
), | ||
] | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters