ILIAS
trunk Revision v11.0_alpha-2658-ge2404539063
◀ ilDoc Overview
LangValidator.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Repository\Validation\Data
;
22
23
use
ILIAS\MetaData\Elements\ElementInterface
;
24
use
ILIAS\MetaData\DataHelper\DataHelperInterface
;
25
26
class
LangValidator
implements
DataValidatorInterface
27
{
28
use
DataFetcher
;
29
30
protected
DataHelperInterface
$data_helper
;
31
32
public
function
__construct
(
33
DataHelperInterface
$data_helper
34
) {
35
$this->data_helper =
$data_helper
;
36
}
37
38
public
function
isValid
(
39
ElementInterface
$element,
40
bool
$ignore_marker
41
): bool {
42
return
in_array(
43
$this->dataValue($element, $ignore_marker),
44
iterator_to_array($this->data_helper->getAllLanguages())
45
);
46
}
47
}
DataFetcher
DataHelperInterface
ILIAS\MetaData\Repository\Validation\Data\DataValidatorInterface
Definition:
DataValidatorInterface.php:25
ILIAS\MetaData\DataHelper\DataHelperInterface
Definition:
DataHelperInterface.php:23
ILIAS\MetaData\Elements\ElementInterface
Definition:
ElementInterface.php:28
ILIAS\MetaData\Repository\Validation\Data
Definition:
DataFetcher.php:21
ILIAS\MetaData\Repository\Validation\Data\LangValidator
Definition:
LangValidator.php:26
ILIAS\MetaData\Repository\Validation\Data\LangValidator\isValid
isValid(ElementInterface $element, bool $ignore_marker)
Definition:
LangValidator.php:38
ILIAS\MetaData\Repository\Validation\Data\LangValidator\$data_helper
DataHelperInterface $data_helper
Definition:
LangValidator.php:30
ElementInterface
ILIAS\MetaData\Repository\Validation\Data\LangValidator\__construct
__construct(DataHelperInterface $data_helper)
Definition:
LangValidator.php:32
components
ILIAS
MetaData
classes
Repository
Validation
Data
LangValidator.php
Generated on Tue Sep 2 2025 23:03:30 for ILIAS by
1.8.13 (using
Doxyfile
)