Store information about the installation, like title, description and contact information in the according fields in the ini or database.
More...
Store information about the installation, like title, description and contact information in the according fields in the ini or database.
Definition at line 11 of file class.ilInstallationInformationStoredObjective.php.
◆ __construct()
◆ achieve()
| ilInstallationInformationStoredObjective::achieve |
( |
Setup\Environment |
$environment | ) |
|
Definition at line 47 of file class.ilInstallationInformationStoredObjective.php.
47 : Setup\Environment
48 {
49 $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
50 $common_config = $environment->getConfigFor("common");
51
53 $ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
54
55 $settings->set(
"inst_name", (
string) $this->config->getClientName());
56 $ini->setVariable(
"client",
"name", $this->config->getClientName() ?? (
string) $common_config->getClientId());
57 $ini->setVariable(
"client",
"description", (
string) $this->config->getClientDescription());
58 $settings->set(
"inst_institution", (
string) $this->config->getClientInstitution());
59 $settings->set(
"admin_firstname", (
string) $this->config->getContactFirstname());
60 $settings->set(
"admin_lastname", (
string) $this->config->getContactLastname());
61 $settings->set(
"admin_title", (
string) $this->config->getContactTitle());
62 $settings->set(
"admin_position", (
string) $this->config->getContactPosition());
63 $settings->set(
"admin_institution", (
string) $this->config->getContactInstitution());
64 $settings->set(
"admin_street", (
string) $this->config->getContactStreet());
65 $settings->set(
"admin_zipcode", (
string) $this->config->getContactZipcode());
66 $settings->set(
"admin_city", (
string) $this->config->getContactCity());
67 $settings->set(
"admin_country", (
string) $this->config->getContactCountry());
68 $settings->set(
"admin_phone", (
string) $this->config->getContactPhone());
69 $settings->set(
"admin_email", (
string) $this->config->getContactEMail());
70
72 throw new Setup\UnachievableException("Could not write client.ini.php");
73 }
74
75 return $environment;
76 }
References $factory, $ini, and ILIAS\LTI\ToolProvider\$settings.
◆ getHash()
| ilInstallationInformationStoredObjective::getHash |
( |
| ) |
|
◆ getLabel()
| ilInstallationInformationStoredObjective::getLabel |
( |
| ) |
|
◆ getPreconditions()
| ilInstallationInformationStoredObjective::getPreconditions |
( |
Setup\Environment |
$environment | ) |
|
◆ isApplicable()
| ilInstallationInformationStoredObjective::isApplicable |
( |
Setup\Environment |
$environment | ) |
|
@inheritDoc
Definition at line 81 of file class.ilInstallationInformationStoredObjective.php.
81 : bool
82 {
83 $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
84 $common_config = $environment->getConfigFor("common");
85
87 $ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
88
89 $client_name = $this->config->getClientName() ?? (string) $common_config->getClientId();
90
91 return
92 $settings->get(
"inst_name") !== $this->config->getClientName() ||
93 $ini->readVariable(
"client",
"name") !== $client_name ||
94 $ini->readVariable(
"client",
"description") !== $this->config->getClientDescription() ||
95 $settings->get(
"inst_institution") !== $this->config->getClientInstitution() ||
96 $settings->get(
"admin_firstname") !== $this->config->getContactFirstname() ||
97 $settings->get(
"admin_lastname") !== $this->config->getContactLastname() ||
98 $settings->get(
"admin_title") !== $this->config->getContactTitle() ||
99 $settings->get(
"admin_position") !== $this->config->getContactPosition() ||
100 $settings->get(
"admin_institution") !== $this->config->getContactInstitution() ||
101 $settings->get(
"admin_street") !== $this->config->getContactStreet() ||
102 $settings->get(
"admin_zipcode") !== $this->config->getContactZipcode() ||
103 $settings->get(
"admin_city") !== $this->config->getContactCity() ||
104 $settings->get(
"admin_country") !== $this->config->getContactCountry() ||
105 $settings->get(
"admin_phone") !== $this->config->getContactPhone() ||
106 $settings->get(
"admin_email") !== $this->config->getContactEMail()
107 ;
108 }
References $factory, $ini, and ILIAS\LTI\ToolProvider\$settings.
◆ isNotable()
| ilInstallationInformationStoredObjective::isNotable |
( |
| ) |
|
◆ $config
| ilInstallationInformationStoredObjective::$config |
|
protected |
The documentation for this class was generated from the following file: