Skip to content

Commit

Permalink
Merge pull request #2113 from dpfaffenbauer/issues/cart-context-priority
Browse files Browse the repository at this point in the history
[StorageList] fix storage-list priority
  • Loading branch information
dpfaffenbauer authored Nov 16, 2022
2 parents 5070ab7 + 84efb51 commit 384a50e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function load(array $configs, ContainerBuilder $container): void

$factoryContextDefinition = new Definition(StorageListFactoryContext::class);
$factoryContextDefinition->setArgument('$storageListFactory', new Reference($list['resource']['factory']));
$factoryContextDefinition->addTag($list['context']['tag'], ['priority' => 0]);
$factoryContextDefinition->addTag($list['context']['tag'], ['priority' => -999]);

$container->setDefinition('coreshop.storage_list.context.factory.' . $name, $factoryContextDefinition);

Expand Down Expand Up @@ -148,7 +148,7 @@ public function load(array $configs, ContainerBuilder $container): void
$customerAndStoreBasedContextDefinition->setArgument('$customerContext', new Reference('coreshop.context.customer'));
$customerAndStoreBasedContextDefinition->setArgument('$storeContext', new Reference('coreshop.context.store'));
$customerAndStoreBasedContextDefinition->setArgument('$repository', new Reference($list['resource']['repository']));
$customerAndStoreBasedContextDefinition->addTag($list['context']['tag'], ['priority' => 777]);
$customerAndStoreBasedContextDefinition->addTag($list['context']['tag'], ['priority' => -777]);

$container->setDefinition('coreshop.storage_list.context.customer_and_store_based.' . $name, $customerAndStoreBasedContextDefinition);

Expand Down Expand Up @@ -178,7 +178,7 @@ public function load(array $configs, ContainerBuilder $container): void
$sessionAndStoreBasedContextDefinition->setArgument('$sessionKeyName', $list['session']['key']);
$sessionAndStoreBasedContextDefinition->setArgument('$repository', new Reference($list['resource']['repository']));
$sessionAndStoreBasedContextDefinition->setArgument('$storeContext', new Reference('coreshop.context.store'));
$sessionAndStoreBasedContextDefinition->addTag($list['context']['tag'], ['priority' => 555]);
$sessionAndStoreBasedContextDefinition->addTag($list['context']['tag'], ['priority' => -555]);

$container->setDefinition('coreshop.storage_list.context.session_and_store_based.' . $name, $sessionAndStoreBasedContextDefinition);

Expand Down

0 comments on commit 384a50e

Please sign in to comment.