ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
VocabSourceValidator.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
26 {
27  use DataFetcher;
28  use VocabularyBridge;
29 
30  public function isValid(
31  ElementInterface $element,
32  bool $ignore_marker
33  ): bool {
34  $sources = [];
35  foreach ($this->vocabularies($element, $ignore_marker) as $vocabulary) {
36  $sources[] = $vocabulary->source();
37  }
38  return in_array($this->dataValue($element, $ignore_marker), $sources);
39  }
40 }
isValid(ElementInterface $element, bool $ignore_marker)
vocabularies(ElementInterface $element, bool $ignore_marker)