ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSystemCheckDefinitionProcessor Class Reference
+ Inheritance diagram for ilSystemCheckDefinitionProcessor:
+ Collaboration diagram for ilSystemCheckDefinitionProcessor:

Public Member Functions

 __construct (\ilDBInterface $db)
 
 purge ()
 This methods is supposed to purge existing data in the provider of the component, so new components can be added to a clean slate. More...
 
 beginComponent (string $component, string $type)
 This method is called when parsing of component.xml for the given component starts. More...
 
 endComponent (string $component, string $type)
 This method is called when parsing of component.xml for the given component ends. More...
 
 beginTag (string $name, array $attributes)
 This is called when a tag starts in the context of the given component. More...
 
 endTag (string $name)
 This is called when a tag ends in the context of the given component. More...
 

Protected Attributes

ilDBInterface $db
 
string $component_id
 

Detailed Description

Definition at line 20 of file class.ilSystemCheckDefinitionProcessor.php.

Constructor & Destructor Documentation

◆ __construct()

ilSystemCheckDefinitionProcessor::__construct ( \ilDBInterface  $db)

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

References $db.

26  {
27  $this->db = $db;
28  }

Member Function Documentation

◆ beginComponent()

ilSystemCheckDefinitionProcessor::beginComponent ( string  $component,
string  $type 
)

This method is called when parsing of component.xml for the given component starts.

This is supposed to reset any internal parsing state.

Implements ilComponentDefinitionProcessor.

Definition at line 34 of file class.ilSystemCheckDefinitionProcessor.php.

References null.

34  : void
35  {
36  $this->component_id = null;
37  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ beginTag()

ilSystemCheckDefinitionProcessor::beginTag ( string  $name,
array  $attributes 
)

This is called when a tag starts in the context of the given component.

Parameters
string[]$attributes

Implements ilComponentDefinitionProcessor.

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

References ilSCGroups\getInstance(), ilSCTasks\getInstanceByGroupId(), and null.

44  : void
45  {
46  if ($name === "module" || $name === "service") {
47  $this->component_id = $attributes["id"] ?? null;
48  return;
49  }
50  if ($name !== "systemcheck" || $name !== "systemcheck_task") {
51  return;
52  }
53  if ($this->component_id === null) {
54  throw new \RuntimeException(
55  "Found $name-tag outside of module or service."
56  );
57  }
58 
59  if ($name === "systemcheck") {
60  ilSCGroups::getInstance()->updateFromComponentDefinition($this->component_id);
61  }
62  if ($name === "systemcheck_task") {
63  $group_id = ilSCGroups::getInstance()->lookupGroupByComponentId($this->component_id);
64  $tasks = ilSCTasks::getInstanceByGroupId($group_id);
65  $tasks->updateFromComponentDefinition((string) ($attributes['identifier'] ?? ''));
66  }
67  }
static getInstanceByGroupId(int $a_group_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getInstance()
+ Here is the call graph for this function:

◆ endComponent()

ilSystemCheckDefinitionProcessor::endComponent ( string  $component,
string  $type 
)

This method is called when parsing of component.xml for the given component ends.

Implements ilComponentDefinitionProcessor.

Definition at line 39 of file class.ilSystemCheckDefinitionProcessor.php.

References null.

39  : void
40  {
41  $this->component_id = null;
42  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ endTag()

ilSystemCheckDefinitionProcessor::endTag ( string  $name)

This is called when a tag ends in the context of the given component.

Implements ilComponentDefinitionProcessor.

Definition at line 69 of file class.ilSystemCheckDefinitionProcessor.php.

References null.

69  : void
70  {
71  if ($name === "module" || $name === "service") {
72  $this->component_id = null;
73  }
74  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ purge()

ilSystemCheckDefinitionProcessor::purge ( )

This methods is supposed to purge existing data in the provider of the component, so new components can be added to a clean slate.

Implements ilComponentDefinitionProcessor.

Definition at line 30 of file class.ilSystemCheckDefinitionProcessor.php.

30  : void
31  {
32  }

Field Documentation

◆ $component_id

string ilSystemCheckDefinitionProcessor::$component_id
protected

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

◆ $db

ilDBInterface ilSystemCheckDefinitionProcessor::$db
protected

Definition at line 22 of file class.ilSystemCheckDefinitionProcessor.php.

Referenced by __construct().


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