ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
NotEmptyConstraint.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Repository\Form
;
22
23
use
ILIAS\Data
;
24
use
ILIAS\Refinery\Custom\Constraint
;
25
use
ilLanguage
;
26
27
class
NotEmpty
extends
Constraint
28
{
29
public
function
__construct
(Data\
Factory
$data_factory,
ilLanguage
$lng
)
30
{
31
$lng->
loadLanguageModule
(
"rep"
);
32
parent::__construct
(
33
static
function
($value):
bool
{
34
return
trim($value) !==
''
;
35
},
36
static
function
(
$txt
, $value):
string
{
37
return
$txt
(
"rep_input_not_empty"
);
38
},
39
$data_factory,
40
$lng
41
);
42
}
43
}
ilLanguage
ILIAS\Refinery\Constraint
A constraint encodes some resrtictions on values.
Definition:
Constraint.php:31
ilLanguage\loadLanguageModule
loadLanguageModule(string $a_module)
Load language module.
Definition:
class.ilLanguage.php:228
Constraint
ILIAS\MetaData\Repository\Validation\Data\__construct
__construct(VocabulariesInterface $vocabularies)
Definition:
VocabularyBridge.php:31
ILIAS\Repository\Form\NotEmpty\__construct
__construct(Data\Factory $data_factory, ilLanguage $lng)
Definition:
NotEmptyConstraint.php:29
Factory
$lng
$lng
Definition:
save_question_post_data.php:24
$txt
$txt
Definition:
error.php:14
ILIAS\Repository\Form\NotEmpty
Definition:
NotEmptyConstraint.php:27
ILIAS\Repository\Form
Definition:
class.FormAdapterGUI.php:21
ILIAS\Data
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Alphanumeric.php:11
Services
Repository
Service
Form
NotEmptyConstraint.php
Generated on Wed Sep 10 2025 14:11:51 for ILIAS by
1.8.13 (using
Doxyfile
)