ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LOMDictionary.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
26use function PHPUnit\Framework\throwException;
27
28class LOMDictionary extends BaseDictionary implements DictionaryInterface
29{
30 public function tagForElement(
32 ): ?TagInterface {
33 foreach (parent::tagsForElement($element) as $tag) {
34 if (!($tag instanceof TagInterface)) {
35 throw new \ilMDRepositoryException('Invalid dictionary');
36 }
37 return $tag;
38 }
39 return null;
40 }
41}
tagForElement(BaseElementInterface $element)
tagsForElement(BaseElementInterface $element)
If possible, takes into account the index of elements when finding tags (beginning with 0).
Definition: Dictionary.php:59