ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSetupMetricsCollectedObjective Class Reference
+ Inheritance diagram for ilSetupMetricsCollectedObjective:
+ Collaboration diagram for ilSetupMetricsCollectedObjective:

Public Member Functions

 getLabel ()
 

Protected Member Functions

 getTentativePreconditions (Setup\Environment $environment)
 
 collectFrom (Setup\Environment $environment, Setup\Metrics\Storage $storage)
 

Detailed Description

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

Member Function Documentation

◆ collectFrom()

ilSetupMetricsCollectedObjective::collectFrom ( Setup\Environment  $environment,
Setup\Metrics\Storage  $storage 
)
protected

Definition at line 38 of file class.ilSetupMetricsCollectedObjective.php.

References $client_id, and $ini.

38  : void
39  {
40  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
41  $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
42  $storage->storeStableBool(
43  "is_installed",
44  $ini !== null && $client_ini !== null,
45  "Are there any indications an installation was performed?"
46  );
47  $client_id = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_ID);
48  if ($client_id) {
49  $storage->storeConfigText(
50  "client_id",
51  $client_id,
52  "Id of the ILIAS client."
53  );
54  }
55  $settings_factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
56  if ($settings_factory) {
57  $common_settings = $settings_factory->settingsFor("common");
58  $nic_enabled = $common_settings->get("nic_enabled") == "1";
59  $storage->storeStableBool(
60  "nic_enabled",
61  $nic_enabled,
62  "Is the installation registered at the ILIAS NIC server?"
63  );
64  if ($nic_enabled) {
65  $storage->storeConfigText(
66  "inst_id",
67  $common_settings->get("inst_id"),
68  "The id of the installation as provided by the ILIAS NIC server."
69  );
70  }
71  }
72  }
$client_id
Definition: ltiauth.php:68
$ini
Definition: raiseError.php:4

◆ getLabel()

ilSetupMetricsCollectedObjective::getLabel ( )

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

25  : string
26  {
27  return "Collect common metrics for the ILIAS installation.";
28  }

◆ getTentativePreconditions()

ilSetupMetricsCollectedObjective::getTentativePreconditions ( Setup\Environment  $environment)
protected

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

30  : array
31  {
32  return [
34  new \ilSettingsFactoryExistsObjective()
35  ];
36  }

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