19 declare(strict_types=1);
    60         private readonly 
string $id,
    63         private readonly array $content_as_component,
    65         ?
Closure $create_table_gui = null
    67         $this->create_table_gui = $create_table_gui ?? fn($gui, $command, $t) => 
new Table($gui, $command, $t);
    73             fn($criterion) => $this->
toCondition($criterion)->asComponent(),
    74             $this->document_repository,
    75             new UI($this->
id, $this->container->ui(), $this->container->language()),
    79         if ($edit_links !== null) {
    85         return $this->container->ui()->factory()->legacy($table->getHTML());
    92             $this->document_repository->all()
   106         return $this->document_repository;
   111         return bin2hex(openssl_random_pseudo_bytes((
int) floor(255 / 2)));
   116         return $this->conditions->choices()[$content->
type()]->withCriterion($content);
   124         $selected = $criterion ? [
   125             $criterion->type() => $criterion->arguments()
   128         $choices = $this->conditions->
choices();
   129         $groups = array_combine(array_keys($choices), 
array_map(
   131             array_values($choices),
   135         return new SelectionMap($groups, $this->conditions->defaultSelection());
   152         return $this->content_as_component[$content->
type()]($content);
   159             if ($a->equals($b)) {
   160                 return new Error(self::CRITERION_ALREADY_EXISTS);
   163             if ($a->knownToNeverMatchWith($this->toCondition($b))) {
   164                 return new Error(self::CRITERION_WOULD_NEVER_MATCH);
   178         foreach ($array as $x) {
   179             if ($predicate($x)) {
   184         return new Error(
'Not found.');
   194         return $this->
find($predicate, $array)->isOk();
   204         return !$this->
any(
static fn($x) => !$predicate($x), $array);
 then(callable $f)
Get a new result from the callable or do nothing if this is an error. 
 
formGroup(array $arguments=[])
 
validateAgainst(Result $b, Criterion $a)
 
all(Closure $predicate, array $array)
A 
 
contentAsComponent(DocumentContent $content)
 
const CRITERION_ALREADY_EXISTS
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
documentMatches(Document $document, ilObjUser $user)
 
readonly Closure $create_table_gui
 
Customizing of pimple-DIC for ILIAS. 
 
find(Closure $predicate, array $array)
A 
 
__construct(private readonly string $id, private readonly DocumentRepository $document_repository, private readonly SelectionMap $conditions, private readonly array $content_as_component, private readonly Container $container, ?Closure $create_table_gui=null)
 
conditionGroups(?CriterionContent $criterion=null)
 
A result encapsulates a value or an error and simplifies the handling of those. 
 
validateCriteriaContent(array $criteria, CriterionContent $content)
 
any(Closure $predicate, array $array)
A 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples 
 
toCondition(CriterionContent $content)
 
chooseDocumentFor(ilObjUser $user)
 
table(object $gui, string $command, ?EditLinks $edit_links=null)
 
const CRITERION_WOULD_NEVER_MATCH