ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
BuildSubitemPresentationReadersObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Search\Setup;
22
23use ILIAS\Setup\Artifact\BuildArtifactObjective as ilBuildArtifactObjective;
25use ILIAS\Setup\Artifact\ArrayArtifact as ilSetupArrayArtifact;
26use ILIAS\Setup\ImplementationOfInterfaceFinder as ilSetupImplementationOfInterfaceFinder;
28
29class BuildSubitemPresentationReadersObjective extends ilBuildArtifactObjective
30{
31 public function getArtifactName(): string
32 {
33 return "search_subitem_presentation_readers";
34 }
35
36 public function build(): ilSetupArtifact
37 {
38 $class_names = [];
39 $finder = new ilSetupImplementationOfInterfaceFinder();
40 $classes_by_type = [];
41 foreach ($finder->getMatchingClassNames(PropertiesReader::class) as $class_name) {
42 $classes_by_type[$class_name::type()] = $class_name;
43 };
44 return new ilSetupArrayArtifact($classes_by_type);
45 }
46}
getArtifactName()
Get the filename where the builder wants to put its artifact.
An array as an artifact.
This is an objective to build some artifact.