ILIAS  release_8 Revision v8.23
Not.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Refinery\Logical;
22 
24 use ILIAS\Data;
25 use ilLanguage;
26 
27 class Not extends Constraint
28 {
29  public function __construct(Constraint $constraint, Data\Factory $data_factory, ilLanguage $lng)
30  {
32  static function ($value) use ($constraint) {
33  return !$constraint->accepts($value);
34  },
35  static function ($txt, $value) use ($constraint): string {
36  return (string) $txt("not_generic", $constraint->getErrorMessage($value));
37  },
38  $data_factory,
39  $lng
40  );
41  }
42 }
$lng
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
__construct(Constraint $constraint, Data\Factory $data_factory, ilLanguage $lng)
Definition: Not.php:29
$txt
Definition: error.php:13
accepts($value)
Tells if the provided value complies.
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Group.php:21