ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
CollectTypesObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
28{
29 public function __construct(
30 private readonly array $contributions
31 ) {
32 }
33
34 public function getArtifactName(): string
35 {
36 return 'custom_field_types';
37 }
38
39 public function build(): Artifact
40 {
41 return new ArrayArtifact(
42 array_reduce(
43 $this->contributions,
44 static function (array $c, Type $type): array {
45 $c[] = $type::class;
46 return $c;
47 },
48 []
49 )
50 );
51 }
52}
An array as an artifact.
This is an objective to build some artifact.
getArtifactName()
Get the filename where the builder wants to put its artifact.
$c
Definition: deliver.php:25
An artifact is some file that is build on demand per installation and is not shipped with the ILIAS s...
Definition: Artifact.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...