<?php
 namespace App\OfferProfileRules; class Criterion_OfferAttribute_Multiplier extends CriterionAbstract { public function checkFields(\App\OfferProfileRules\Fields $fields) { return $this->checkField($fields->offerProductMultiplier); } public function checkAssignedValues(\App\MessagesCollector $msgs) { if (!$this->values and in_array($this->operation, ['containsInclusive', 'containsExclusive', 'containsOne', 'containsNone'])) { $msgs->addWarning("No offer multiplier set."); } else { foreach($this->values as $multiplierCode) { if (!$multiplierCode) { $msgs->addWarning("You cannot set an empty multiplier code."); } } } } protected function createDescription_getEntityName($code) { return $code; } } 