ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilSetupConfigStoredObjective Class Reference
+ Inheritance diagram for ilSetupConfigStoredObjective:
+ Collaboration diagram for ilSetupConfigStoredObjective:

Public Member Functions

 __construct (\ilSetupConfig $config, \ilSetupPasswordManager $password_manager)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
- Public Member Functions inherited from ilSetupObjective
 __construct (\ilSetupConfig $config)
 

Protected Attributes

 $password_manager
 
- Protected Attributes inherited from ilSetupObjective
 $config
 

Detailed Description

Definition at line 8 of file class.ilSetupConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilSetupConfigStoredObjective::__construct ( \ilSetupConfig  $config,
\ilSetupPasswordManager  $password_manager 
)

Definition at line 15 of file class.ilSetupConfigStoredObjective.php.

18 {
20 $this->password_manager = $password_manager;
21 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ilSetupObjective\$config, $password_manager, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ achieve()

ilSetupConfigStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 45 of file class.ilSetupConfigStoredObjective.php.

45 : Setup\Environment
46 {
47 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
48
49 $ini->setVariable(
50 "setup",
51 "pass",
52 $this->password_manager->encodePassword(
53 $this->config->getMasterPassword()->toString()
54 )
55 );
56
57 $ini->setVariable("server", "absolute_path", dirname(__DIR__, 2));
58 $ini->setVariable(
59 "server",
60 "timezone",
61 $this->config->getServerTimeZone()->getName()
62 );
63
64 $ini->setVariable("clients", "default", $this->config->getClientId());
65
66 if (!$ini->write()) {
67 throw new Setup\UnachievableException("Could not write ilias.ini.php");
68 }
69
70 return $environment;
71 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilSetupConfigStoredObjective::getHash ( )

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

23 : string
24 {
25 return hash("sha256", self::class);
26 }

◆ getLabel()

ilSetupConfigStoredObjective::getLabel ( )

Definition at line 28 of file class.ilSetupConfigStoredObjective.php.

28 : string
29 {
30 return "Fill ini with common settings";
31 }

◆ getPreconditions()

ilSetupConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

38 : array
39 {
40 return [
41 new ilIniFilesPopulatedObjective($this->config)
42 ];
43 }

◆ isNotable()

ilSetupConfigStoredObjective::isNotable ( )

Definition at line 33 of file class.ilSetupConfigStoredObjective.php.

33 : bool
34 {
35 return false;
36 }

Field Documentation

◆ $password_manager

ilSetupConfigStoredObjective::$password_manager
protected

Definition at line 13 of file class.ilSetupConfigStoredObjective.php.

Referenced by __construct().


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