19 declare(strict_types=1);
42 $this->component_id = null;
47 public function endComponent(
string $component,
string $type): void
49 $this->component_id = null;
50 $this->component = null;
56 if ($name ===
"module") {
58 } elseif ($name ===
"service") {
60 } elseif ($name ===
"pluginslot") {
66 if (!isset($attributes[
"id"])) {
67 throw new \InvalidArgumentException(
68 "Expected attribute 'id' for tag '$name' in $this->component" 72 $id = $attributes[
"id"];
73 if (!is_null($type)) {
74 if ($type !== $this->type) {
75 throw new \InvalidArgumentException(
76 "Type $this->type and tag don't match for component $this->component" 79 if (isset($this->data[
$id])) {
80 throw new \LogicException(
81 "In $this->type/$this->component: Id '$id' for component is used twice. First occurence was in {$this->data[$id][0]}/{$this->data[$id][1]}." 84 $this->component_id =
$id;
87 if (!isset($attributes[
"name"])) {
88 throw new \InvalidArgumentException(
89 "Expected attribute 'name' for tag '$name' in $this->component" 92 if (isset($this->slots[
$id])) {
93 throw new \LogicException(
94 "In $this->type/$this->component: Id '$id' for plugin slot is used twice. First occurence was in {$this->slots[$id][0]}/{$this->slots[$id][1]}."
An ilComponentDefinitionProcessor processes some attributes from a component.xml (i.e.
endTag(string $name)
This is called when a tag ends in the context of the given component.
beginComponent(string $component, string $type)
This method is called when parsing of component.xml for the given component starts.
beginTag(string $name, array $attributes)
This is called when a tag starts in the context of the given component.
purge()
This methods is supposed to purge existing data in the provider of the component, so new components c...
endComponent(string $component, string $type)
This method is called when parsing of component.xml for the given component ends. ...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins