ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilNICKeyStoredObjective.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5
use
ILIAS\Setup
;
6
7
class
ilNICKeyStoredObjective
extends
ilSetupObjective
8
{
9
public
function
getHash
() : string
10
{
11
return
hash
(
"sha256"
, self::class);
12
}
13
14
public
function
getLabel
() : string
15
{
16
return
"A NIC key for the installation is generated and stored"
;
17
}
18
19
public
function
isNotable
() : bool
20
{
21
return
true
;
22
}
23
24
public
function
getPreconditions
(Setup\
Environment
$environment) : array
25
{
26
return
[
27
new \ilSettingsFactoryExistsObjective()
28
];
29
}
30
31
public
function
achieve
(Setup\
Environment
$environment) : Setup\
Environment
32
{
33
$factory
= $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
34
$settings =
$factory
->settingsFor(
"common"
);
35
36
if
($settings->get(
"nic_key"
)) {
37
return
$environment;
38
}
39
40
$nic_key = $this->
generateNICKey
();
41
$settings->set(
"nic_key"
, $nic_key);
42
43
return
$environment;
44
}
45
46
protected
function
generateNICKey
()
47
{
48
return
md5(uniqid($this->getClientId(),
true
));
49
}
50
}
ilNICKeyStoredObjective\achieve
achieve(Setup\Environment $environment)
Definition:
class.ilNICKeyStoredObjective.php:31
hash
ilNICKeyStoredObjective
Definition:
class.ilNICKeyStoredObjective.php:7
ilNICKeyStoredObjective\isNotable
isNotable()
Definition:
class.ilNICKeyStoredObjective.php:19
ILIAS\Setup
Definition:
AchievementTracker.php:5
ilSetupObjective
Definition:
class.ilSetupObjective.php:7
ilNICKeyStoredObjective\getPreconditions
getPreconditions(Setup\Environment $environment)
Definition:
class.ilNICKeyStoredObjective.php:24
ILIAS\Setup\Environment
An environment holds resources to be used in the setup process.
Definition:
Environment.php:11
ilNICKeyStoredObjective\getLabel
getLabel()
Definition:
class.ilNICKeyStoredObjective.php:14
ilNICKeyStoredObjective\generateNICKey
generateNICKey()
Definition:
class.ilNICKeyStoredObjective.php:46
ilNICKeyStoredObjective\getHash
getHash()
Definition:
class.ilNICKeyStoredObjective.php:9
$factory
$factory
Definition:
metadata.php:58
setup
classes
class.ilNICKeyStoredObjective.php
Generated on Sun Apr 13 2025 20:01:33 for ILIAS by
1.8.13 (using
Doxyfile
)