ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Setup\Condition\CanCreateDirectoriesInDirectoryCondition Class Reference
+ Inheritance diagram for ILIAS\Setup\Condition\CanCreateDirectoriesInDirectoryCondition:
+ Collaboration diagram for ILIAS\Setup\Condition\CanCreateDirectoriesInDirectoryCondition:

Public Member Functions

 __construct (string $which)
 
- Public Member Functions inherited from ILIAS\Setup\Condition\ExternalConditionObjective
 __construct (string $label, \Closure $condition, ?string $message=null, bool $block_setup=false)
 
 getHash ()
 Get a hash for this objective.The hash of two objectives must be the same, if they are the same objective, with the same config on the same environment, i.e. if the one is achieved the other is achieved as well because they are the same. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 
- Public Member Functions inherited from ILIAS\Setup\Objective
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 

Data Fields

const PROBE_NAME = "probe_for_directory_creation"
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Setup\Condition\ExternalConditionObjective
string $label
 
Closure $condition
 
string $message
 
bool $block_setup
 

Detailed Description

Definition at line 25 of file CanCreateDirectoriesInDirectoryCondition.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\Condition\CanCreateDirectoriesInDirectoryCondition::__construct ( string  $which)

Definition at line 29 of file CanCreateDirectoriesInDirectoryCondition.php.

References ILIAS\GlobalScreen\Provider\__construct().

30  {
31  return parent::__construct(
32  "Can create directories in '$which'",
33  function (Setup\Environment $env) use ($which): bool {
34  $probe = $which . "/" . self::PROBE_NAME;
35  if (!@mkdir($probe, 0774)) {
36  return false;
37  }
38  rmdir($probe);
39  return true;
40  },
41  "ILIAS needs to be able to create directories in '$which'."
42  );
43  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Field Documentation

◆ PROBE_NAME

const ILIAS\Setup\Condition\CanCreateDirectoriesInDirectoryCondition::PROBE_NAME = "probe_for_directory_creation"

Definition at line 27 of file CanCreateDirectoriesInDirectoryCondition.php.


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