-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SourceField sync with Gally enabled by Website
- Loading branch information
1 parent
961ec3b
commit 5e1ef72
Showing
16 changed files
with
131 additions
and
32 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
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,48 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Gally to newer versions in the future. | ||
* | ||
* @package Gally | ||
* @author Gally Team <[email protected]> | ||
* @copyright 2024-present Smile | ||
* @license Open Software License v. 3.0 (OSL-3.0) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Gally\OroPlugin\Provider; | ||
|
||
use Gally\OroPlugin\Service\ContextProvider; | ||
use Oro\Bundle\SearchBundle\Configuration\MappingConfigurationProviderAbstract; | ||
use Oro\Bundle\SearchBundle\Provider\SearchMappingProvider as BaseSearchMappingProvider; | ||
use Psr\Cache\CacheItemPoolInterface; | ||
use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||
|
||
/** | ||
* The search mapping provider. | ||
*/ | ||
class SearchMappingProvider extends BaseSearchMappingProvider | ||
{ | ||
public function __construct( | ||
EventDispatcherInterface $dispatcher, | ||
MappingConfigurationProviderAbstract $mappingConfigProvider, | ||
CacheItemPoolInterface $cache, | ||
private ContextProvider $contextProvider, | ||
string $cacheKeyPrefix, | ||
string $searchEngineName, | ||
string $eventName | ||
) { | ||
parent::__construct($dispatcher, $mappingConfigProvider, $cache, $cacheKeyPrefix, $searchEngineName, $eventName); | ||
} | ||
|
||
public function getMappingConfig(): array | ||
{ | ||
$this->contextProvider->setIsGallyContext(true); | ||
$config = parent::getMappingConfig(); | ||
$this->contextProvider->setIsGallyContext(false); | ||
|
||
return $config; | ||
} | ||
} |
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
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
Oops, something went wrong.