Skip to content

Commit

Permalink
[StorageList] fix storage-list priority
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Nov 16, 2022
1 parent 2d61f7f commit 84efb51
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 84efb51

Please sign in to comment.