Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TE-10179 Replace direct usage of Store.php with corresponding Facades…
… and Get rid of APPLICATION_STORE global constant usage. (#8929) TE-10179 Dynamic Store | Backend Modules
- Loading branch information
1 parent
e638624
commit be3ed49
Showing
10 changed files
with
158 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"include": { | ||
"spryker/transfer": "Provides transfer objects decimal property type functionality." | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Spryker/Client/ProductSearch/Dependency/Client/ProductSearchToLocaleClientBridge.php
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,32 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Client\ProductSearch\Dependency\Client; | ||
|
||
class ProductSearchToLocaleClientBridge implements ProductSearchToLocaleClientInterface | ||
{ | ||
/** | ||
* @var \Spryker\Client\Locale\LocaleClientInterface | ||
*/ | ||
protected $localeClient; | ||
|
||
/** | ||
* @param \Spryker\Client\Locale\LocaleClientInterface $localeClient | ||
*/ | ||
public function __construct($localeClient) | ||
{ | ||
$this->localeClient = $localeClient; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getCurrentLocale(): string | ||
{ | ||
return $this->localeClient->getCurrentLocale(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Spryker/Client/ProductSearch/Dependency/Client/ProductSearchToLocaleClientInterface.php
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,16 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Client\ProductSearch\Dependency\Client; | ||
|
||
interface ProductSearchToLocaleClientInterface | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getCurrentLocale(); | ||
} |
34 changes: 34 additions & 0 deletions
34
src/Spryker/Client/ProductSearch/Dependency/Client/ProductSearchToStoreClientBridge.php
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,34 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Client\ProductSearch\Dependency\Client; | ||
|
||
use Generated\Shared\Transfer\StoreTransfer; | ||
|
||
class ProductSearchToStoreClientBridge implements ProductSearchToStoreClientInterface | ||
{ | ||
/** | ||
* @var \Spryker\Client\Store\StoreClientInterface | ||
*/ | ||
protected $storeClient; | ||
|
||
/** | ||
* @param \Spryker\Client\Store\StoreClientInterface $storeClient | ||
*/ | ||
public function __construct($storeClient) | ||
{ | ||
$this->storeClient = $storeClient; | ||
} | ||
|
||
/** | ||
* @return \Generated\Shared\Transfer\StoreTransfer | ||
*/ | ||
public function getCurrentStore(): StoreTransfer | ||
{ | ||
return $this->storeClient->getCurrentStore(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Spryker/Client/ProductSearch/Dependency/Client/ProductSearchToStoreClientInterface.php
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,16 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Client\ProductSearch\Dependency\Client; | ||
|
||
interface ProductSearchToStoreClientInterface | ||
{ | ||
/** | ||
* @return \Generated\Shared\Transfer\StoreTransfer | ||
*/ | ||
public function getCurrentStore(); | ||
} |
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