ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStorageContainersExistingObjective Class Reference

Class ilStorageContainersExistingObjective. More...

+ Inheritance diagram for ilStorageContainersExistingObjective:
+ Collaboration diagram for ilStorageContainersExistingObjective:

Public Member Functions

 __construct (array $storage_handler_ids=null)
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 

Protected Member Functions

 buildStorageBasePath (Setup\Environment $environment)
 

Protected Attributes

 $base_dir
 
 $storage_handler_ids
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilStorageContainersExistingObjective::__construct ( array  $storage_handler_ids = null)

Definition at line 22 of file class.ilStorageContainersExistingObjective.php.

References $storage_handler_ids, and ILIAS\GlobalScreen\Provider\__construct().

23  {
24  parent::__construct(StorageHandlerFactory::BASE_DIRECTORY);
25  $this->storage_handler_ids = $storage_handler_ids ?? $this->storage_handler_ids;
26  $this->base_dir = StorageHandlerFactory::BASE_DIRECTORY;
27  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ achieve()

ilStorageContainersExistingObjective::achieve ( Setup\Environment  $environment)

Definition at line 55 of file class.ilStorageContainersExistingObjective.php.

References buildStorageBasePath().

55  : Setup\Environment
56  {
57  $base_path = $this->buildStorageBasePath($environment);
58  $this->path = $base_path;
59  $environment = parent::achieve($environment);
60 
61  foreach ($this->storage_handler_ids as $storage_handler_id) {
62  $this->path = $base_path . '/' . $storage_handler_id;
63  $environment = parent::achieve($environment);
64  }
65  return $environment;
66  }
+ Here is the call graph for this function:

◆ buildStorageBasePath()

ilStorageContainersExistingObjective::buildStorageBasePath ( Setup\Environment  $environment)
protected

Definition at line 29 of file class.ilStorageContainersExistingObjective.php.

References $base_dir, $client_id, and $ini.

Referenced by achieve(), and isApplicable().

29  : string
30  {
31  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
32  $client_id = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_ID);
33 
34  $storage_directory_full_path = $ini->readVariable('clients',
35  'datadir') . '/' . $client_id . '/' . $this->base_dir;
36  return $storage_directory_full_path;
37  }
$client_id
Definition: webdav.php:17
$ini
Definition: raiseError.php:4
+ Here is the caller graph for this function:

◆ getPreconditions()

ilStorageContainersExistingObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 39 of file class.ilStorageContainersExistingObjective.php.

References $config.

39  : array
40  {
41  // case if it is a fresh ILIAS installation
42  if ($environment->hasConfigFor("filesystem")) {
43  $config = $environment->getConfigFor("filesystem");
44  return [
45  new \ilFileSystemDirectoriesCreatedObjective($config)
46  ];
47  }
48 
49  // case if ILIAS is already installed
50  return [
51  new \ilIniFilesLoadedObjective()
52  ];
53  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

◆ isApplicable()

ilStorageContainersExistingObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 71 of file class.ilStorageContainersExistingObjective.php.

References buildStorageBasePath().

71  : bool
72  {
73  $base_path = $this->buildStorageBasePath($environment);
74  $this->path = $base_path;
75  if (parent::isApplicable($environment)) {
76  return true;
77  }
78 
79  foreach ($this->storage_handler_ids as $storage_handler_id) {
80  $this->path = $base_path . '/' . $storage_handler_id;
81  if (parent::isApplicable($environment)) {
82  return true;
83  }
84  }
85  return false;
86  }
+ Here is the call graph for this function:

Field Documentation

◆ $base_dir

ilStorageContainersExistingObjective::$base_dir
protected

Definition at line 16 of file class.ilStorageContainersExistingObjective.php.

Referenced by buildStorageBasePath().

◆ $storage_handler_ids

ilStorageContainersExistingObjective::$storage_handler_ids
protected
Initial value:
= [
'fsv2'
]

Definition at line 18 of file class.ilStorageContainersExistingObjective.php.

Referenced by __construct().


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