public function __construct(private readonly LineItemGroupServiceRegistry
$serviceRegistry) { } #[Route(path: '/api/_action/promotion/setgroup/packager', name: 'api.action.promotion.setgroup.packager', methods: ['GET'], defaults: ['_acl' => ['promotion:read']])]
public function getSetGroupPackagers(): JsonResponse
{ $packagerKeys =
[];
/** @var LineItemGroupPackagerInterface $packager */
foreach ($this->serviceRegistry->
getPackagers() as $packager) { $packagerKeys[] =
$packager->
getKey();
} return new JsonResponse($packagerKeys);
} #[Route(path: '/api/_action/promotion/setgroup/sorter', name: 'api.action.promotion.setgroup.sorter', methods: ['GET'], defaults: ['_acl' => ['promotion:read']])]
public function getSetGroupSorters(): JsonResponse
{ $sorterKeys =
[];