38 function (
$txt, $value) {
39 return "The passed assignment must be unique for the document!";
53 $otherValues = $this->document->criteria();
58 $idCurrent = $otherValue->getId();
59 $idNew = $value->getId();
61 $uniqueIdEquals = $idCurrent === $idNew;
62 if ($uniqueIdEquals) {
66 $valuesEqual = $value->
equals($otherValue);
71 $valuesHaveSameNature = $this->
haveSameNature($value, $otherValue);
73 return $valuesHaveSameNature;
92 $valuesHaveSameNature = $this->criterionTypeFactory->findByTypeIdent($value->
getCriterionId())->hasUniqueNature();
94 return $valuesHaveSameNature;
haveSameNature(ilAccessibilityDocumentCriterionAssignment $value, ilAccessibilityDocumentCriterionAssignment $otherValue)
Class ilAccessibilityDocument.
Class ilAccessibilityDocumentCriterionAssignmentConstraint.
__construct(ilAccessibilityCriterionTypeFactoryInterface $criterionTypeFactory, ilAccessibilityDocument $document, Factory $dataFactory, ilLanguage $lng)
ilAccessibilityDocumentCriterionAssignmentConstraint constructor.
filterEqualValues(ilAccessibilityDocumentCriterionAssignment $value)
__construct(Container $dic, ilPlugin $plugin)
Interface ilAccessibilityCriterionTypeFactoryInterface.
Class ilAccessibilityDocumentCriterionAssignment.