ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
Not.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\Refinery\Custom\Constraint as CustomConstraint;
25use ILIAS\Data;
26
27class Not extends CustomConstraint
28{
29 public function __construct(
30 Constraint $constraint,
31 Data\Factory $data_factory,
33 ) {
35 static function ($value) use ($constraint) {
36 return !$constraint->accepts($value);
37 },
38 static function ($txt, $value) use ($constraint): string {
39 return (string) $txt('not_generic', $constraint->getErrorMessage($value));
40 },
41 $data_factory,
42 $lng
43 );
44 }
45}
Builds data types.
Definition: Factory.php:36
__construct(Constraint $constraint, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
Definition: Not.php:29
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32
accepts($value)
Tells if the provided value complies.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31