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

Public Member Functions

 __construct (\ilBackgroundTasksSetupConfig $config)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Protected Attributes

 $config
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilBackgroundTasksConfigStoredObjective::__construct ( \ilBackgroundTasksSetupConfig  $config)

Member Function Documentation

◆ achieve()

ilBackgroundTasksConfigStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 43 of file class.ilBackgroundTasksConfigStoredObjective.php.

43 : Setup\Environment
44 {
45 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
46
47 if (!$ini->groupExists("background_tasks")) {
48 $ini->addGroup("background_tasks");
49 }
50
51 $ini->setVariable("background_tasks", "concurrency", $this->config->getType());
52 $ini->setVariable("background_tasks", "number_of_concurrent_tasks", $this->config->getMaxCurrentTasks());
53
54 if (!$ini->write()) {
55 throw new Setup\UnachievableException("Could not write ilias.ini.php");
56 }
57
58 return $environment;
59 }
$ini
Definition: raiseError.php:4

References $ini.

◆ getHash()

ilBackgroundTasksConfigStoredObjective::getHash ( )

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

20 : string
21 {
22 return hash("sha256", self::class);
23 }

◆ getLabel()

ilBackgroundTasksConfigStoredObjective::getLabel ( )

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

25 : string
26 {
27 return "Fill ini with settings for Services/BackgroundTasks";
28 }

◆ getPreconditions()

ilBackgroundTasksConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 35 of file class.ilBackgroundTasksConfigStoredObjective.php.

35 : array
36 {
37 $common_config = $environment->getConfigFor("common");
38 return [
39 new ilIniFilesPopulatedObjective($common_config)
40 ];
41 }

◆ isNotable()

ilBackgroundTasksConfigStoredObjective::isNotable ( )

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

30 : bool
31 {
32 return false;
33 }

Field Documentation

◆ $config

ilBackgroundTasksConfigStoredObjective::$config
protected

Definition at line 12 of file class.ilBackgroundTasksConfigStoredObjective.php.

Referenced by __construct().


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