<?php
 namespace App\OfferProfileRules; class Criterion_ImportedServiceBookOffice extends CriterionAbstract { public function checkFields(\App\OfferProfileRules\Fields $fields) { return $this->checkField($fields->importedServiceBookOffice); } public function checkAssignedValues(\App\MessagesCollector $msgs) { if (($this->operation=='equal' or $this->operation=='notEqual') and !$this->values) { $msgs->addWarning("No book office code set."); } else { foreach($this->values as $elem) { if (!$elem) { $msgs->addWarning("You cannot set an empty book office code."); } } } } protected function createDescription_getEntityName($code) { return $code; } } 