ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Component\Setup\PublicAssetsBuildObjective Class Reference
+ Inheritance diagram for ILIAS\Component\Setup\PublicAssetsBuildObjective:
+ Collaboration diagram for ILIAS\Component\Setup\PublicAssetsBuildObjective:

Public Member Functions

 __construct (protected PublicAssetManager $public_asset_manager, protected array $public_assets)
 
 getHash ()
 Get a hash for this objective. 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...
 

Detailed Description

Definition at line 26 of file PublicAssetsBuildObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Component\Setup\PublicAssetsBuildObjective::__construct ( protected PublicAssetManager  $public_asset_manager,
protected array  $public_assets 
)

Definition at line 28 of file PublicAssetsBuildObjective.php.

31  {
32  }

Member Function Documentation

◆ achieve()

ILIAS\Component\Setup\PublicAssetsBuildObjective::achieve ( Setup\Environment  $environment)

Definition at line 54 of file PublicAssetsBuildObjective.php.

54  : Setup\Environment
55  {
56  $base_dir = realpath(__DIR__ . "/../../../../../");
57  $target = realpath($base_dir) . "/public";
58 
59  $this->public_asset_manager->addAssets(...$this->public_assets);
60  $this->public_asset_manager->buildPublicFolder($base_dir, $target);
61 
62  return $environment;
63  }

◆ getHash()

ILIAS\Component\Setup\PublicAssetsBuildObjective::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.

Implements ILIAS\Setup\Objective.

Definition at line 34 of file PublicAssetsBuildObjective.php.

34  : string
35  {
36  return hash("sha256", self::class);
37  }

◆ getLabel()

ILIAS\Component\Setup\PublicAssetsBuildObjective::getLabel ( )

Get a label that describes this objective.

Implements ILIAS\Setup\Objective.

Definition at line 39 of file PublicAssetsBuildObjective.php.

39  : string
40  {
41  return "The public folder is populated with all required assets.";
42  }

◆ getPreconditions()

ILIAS\Component\Setup\PublicAssetsBuildObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 49 of file PublicAssetsBuildObjective.php.

49  : array
50  {
51  return [];
52  }

◆ isApplicable()

ILIAS\Component\Setup\PublicAssetsBuildObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 65 of file PublicAssetsBuildObjective.php.

65  : bool
66  {
67  return true;
68  }

◆ isNotable()

ILIAS\Component\Setup\PublicAssetsBuildObjective::isNotable ( )

Get to know if this is an interesting objective for a human.

Implements ILIAS\Setup\Objective.

Definition at line 44 of file PublicAssetsBuildObjective.php.

44  : bool
45  {
46  return true;
47  }

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