ILIAS
trunk Revision v12.0_alpha-1540-g00f839d5fa1
◀ ilDoc Overview
LOMDictionary.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\XML\Dictionary
;
22
23
use
ILIAS\MetaData\Elements\Base\BaseElementInterface
;
24
use
ILIAS\MetaData\Structure\Dictionaries\Dictionary
as BaseDictionary;
25
use
ILIAS\MetaData\XML\Version
;
26
27
use
function
PHPUnit\Framework\throwException;
28
29
class
LOMDictionary
extends
BaseDictionary implements
DictionaryInterface
30
{
31
public
function
tagForElement
(
32
BaseElementInterface
$element,
33
Version
$version
34
): ?
TagInterface
{
35
foreach (parent::
tagsForElement
($element) as $tag) {
36
if
(!($tag instanceof
TagInterface
)) {
37
throw
new \ilMDXMLException(
'Invalid dictionary'
);
38
}
39
if
($tag->version() ===
$version
) {
40
return
$tag;
41
}
42
}
43
return
null
;
44
}
45
}
$version
$version
Definition:
plugin.php:24
ILIAS\MetaData\Structure\Dictionaries\Dictionary
Definition:
Dictionary.php:33
ILIAS\MetaData\Structure\Dictionaries\Dictionary\tagsForElement
tagsForElement(BaseElementInterface $element)
If possible, takes into account the index of elements when finding tags (beginning with 0).
Definition:
Dictionary.php:59
ILIAS\MetaData\XML\Dictionary\LOMDictionary
Definition:
LOMDictionary.php:30
ILIAS\MetaData\XML\Dictionary\LOMDictionary\tagForElement
tagForElement(BaseElementInterface $element, Version $version)
Definition:
LOMDictionary.php:31
ILIAS\MetaData\Elements\Base\BaseElementInterface
Definition:
BaseElementInterface.php:28
ILIAS\MetaData\XML\Dictionary\DictionaryInterface
Definition:
DictionaryInterface.php:27
ILIAS\MetaData\XML\Dictionary\TagInterface
Definition:
TagInterface.php:27
ILIAS\MetaData\XML\Dictionary
Definition:
DictionaryInterface.php:21
ILIAS\MetaData\XML\Version
Version
Definition:
Version.php:24
components
ILIAS
MetaData
classes
XML
Dictionary
LOMDictionary.php
Generated on Wed Jun 3 2026 23:05:27 for ILIAS by
1.9.4 (using
Doxyfile
)