ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilEventHandlingBuildEventInfoObjective Class Reference
+ Inheritance diagram for ilEventHandlingBuildEventInfoObjective:
+ Collaboration diagram for ilEventHandlingBuildEventInfoObjective:

Public Member Functions

 getArtifactPath ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 build ()
 

Private Attributes

ilComponentRepository $component_repository = null
 

Detailed Description

Member Function Documentation

◆ achieve()

ilEventHandlingBuildEventInfoObjective::achieve ( Setup\Environment  $environment)

Definition at line 37 of file class.ilEventHandlingBuildEventInfoObjective.php.

References ILIAS\Setup\Environment\getResource().

37  : Setup\Environment
38  {
39  $this->component_repository = $environment->getResource(Setup\Environment::RESOURCE_COMPONENT_REPOSITORY);
40 
41  return parent::achieve($environment);
42  }
+ Here is the call graph for this function:

◆ build()

ilEventHandlingBuildEventInfoObjective::build ( )

Definition at line 44 of file class.ilEventHandlingBuildEventInfoObjective.php.

References $component_repository, XapiProxy\$plugin, ILIAS\MetaData\Repository\Validation\Data\__construct(), and ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from().

44  : Setup\Artifact
45  {
46  $processor = new \ilEventHandlingDefinitionProcessor();
47 
48  // Plugins behave slightly differently from core components: they do not always have a plugin.xml and the
49  // `ilComponentDefinitionReader` does not read them at all. Therefore, we overwrite the reader at this point
50  // and supplement it with the information from the existing plugins.
51 
52  $plugin_and_components_reader = new class ($this->component_repository, $processor) extends
54  public function __construct(
56  ilComponentDefinitionProcessor ...$processor,
57  ) {
58  parent::__construct(...$processor);
59  }
60 
61  protected function getComponents(): \Iterator
62  {
63  yield from parent::getComponents();
64 
65  foreach ($this->component_repository->getPlugins() as $plugin) {
66  $xml_plugin_path = $plugin->getPath() . '/plugin.xml';
67  if (!file_exists($xml_plugin_path)) {
68  continue;
69  }
70  yield [
71  'Plugins', // Plugins are generally handled in ilAppEventHandler with the prefix "Plugins".
72  $plugin->getName(),
73  $xml_plugin_path,
74  ];
75  }
76  }
77  };
78 
79  $plugin_and_components_reader->purge();
80  $plugin_and_components_reader->readComponentDefinitions();
81 
82  return new Setup\Artifact\ArrayArtifact($processor->getData());
83  }
Readable part of repository interface to ilComponentDataDB.
An ilComponentDefinitionProcessor processes some attributes from a component.xml (i.e.
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

◆ getArtifactPath()

ilEventHandlingBuildEventInfoObjective::getArtifactPath ( )

Definition at line 25 of file class.ilEventHandlingBuildEventInfoObjective.php.

25  : string
26  {
27  return \ilArtifactEventHandlingData::EVENT_HANDLING_DATA_PATH;
28  }

◆ getPreconditions()

ilEventHandlingBuildEventInfoObjective::getPreconditions ( Setup\Environment  $environment)

Field Documentation

◆ $component_repository

ilComponentRepository ilEventHandlingBuildEventInfoObjective::$component_repository = null
private

Definition at line 23 of file class.ilEventHandlingBuildEventInfoObjective.php.

Referenced by build().


The documentation for this class was generated from the following file: