ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
CollectSettingsObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\User\Settings;
22
26
28{
29 public function __construct(
30 private readonly array $contributions
31 ) {
32 }
33
34 public function getArtifactName(): string
35 {
36 return 'user_settings';
37 }
38
39 public function build(): Artifact
40 {
41 return new ArrayArtifact(
42 array_reduce(
43 $this->contributions,
44 static fn(array $c, UserSettings $settings): array => array_merge($c, $settings->getSettingConfigurations()),
45 []
46 )
47 );
48 }
49}
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.
__construct(private readonly array $contributions)
$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
getSettingConfigurations()
Return all User Settings provided by the component.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...