$criteria =
new Criteria($promotionIds);
$criteria->
addAssociation('cartRules'
);
$promotions =
$this->promotionRepository->
search($criteria,
$context->
getContext())->
getEntities();
} return $promotions;
} private function checkRuleType(Container
$rule): bool
{ foreach ($rule->
getRules() as $nestedRule) { if ($nestedRule instanceof Container &&
$this->
checkRuleType($nestedRule) === false
) { return false;
} if ($nestedRule instanceof PaymentMethodRule
) { return false;
} } return true;
} private function checkPromotion(PromotionEntity
$promotion): bool
{