return [ 'identifiers' => RuleConstraints::
uuids(),
'operator' => RuleConstraints::
uuidOperators(false
),
];
} public function getConfig(): RuleConfig
{ return (new RuleConfig()) ->
operatorSet(RuleConfig::OPERATOR_SET_STRING, false, true
) ->
entitySelectField('identifiers', PromotionDefinition::ENTITY_NAME, true
);
} private function lineItemMatches(LineItem
$lineItem): bool
{ if ($lineItem->
getType() !== LineItem::PROMOTION_LINE_ITEM_TYPE
) { return $this->operator === self::OPERATOR_NEQ;
} $promotionId =
$lineItem->
getPayloadValue('promotionId'
);
return RuleComparison::
uuids([$promotionId],
$this->identifiers,
$this->operator
);
}