ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Setup\Objective\MigrationObjective Class Reference

handles a Migration More...

+ Inheritance diagram for ILIAS\Setup\Objective\MigrationObjective:
+ Collaboration diagram for ILIAS\Setup\Objective\MigrationObjective:

Public Member Functions

 __construct (Setup\Migration $migration, ?int $steps=null)
 
 getHash ()
 Uses hashed Path. More...
 
 getLabel ()
 
 isNotable ()
 Defaults to 'true'. More...
 
 getPreconditions (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...
 

Protected Attributes

Setup Migration $migration
 
int $steps
 

Detailed Description

handles a Migration

Definition at line 28 of file MigrationObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\Objective\MigrationObjective::__construct ( Setup\Migration  $migration,
?int  $steps = null 
)

Definition at line 33 of file MigrationObjective.php.

References ILIAS\Setup\Objective\MigrationObjective\$migration.

34  {
35  $this->migration = $migration;
36  $this->steps = $steps ?? $migration->getDefaultAmountOfStepsPerRun();
37  }

Member Function Documentation

◆ getHash()

ILIAS\Setup\Objective\MigrationObjective::getHash ( )

Uses hashed Path.

Implements ILIAS\Setup\Objective.

Definition at line 43 of file MigrationObjective.php.

43  : string
44  {
45  return hash("sha256", self::class . '' . get_class($this->migration));
46  }

◆ getLabel()

ILIAS\Setup\Objective\MigrationObjective::getLabel ( )

Implements ILIAS\Setup\Objective.

Definition at line 51 of file MigrationObjective.php.

51  : string
52  {
53  return $this->migration->getLabel();
54  }

◆ getPreconditions()

ILIAS\Setup\Objective\MigrationObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 68 of file MigrationObjective.php.

References ILIAS\Setup\Objective\MigrationObjective\$steps, ILIAS\Setup\Objective\achieve(), ILIAS\Setup\Environment\getResource(), ILIAS\Setup\Migration\INFINITE, and ILIAS\Setup\Environment\RESOURCE_ADMIN_INTERACTION.

68  : array
69  {
70  return $this->migration->getPreconditions($environment);
71  }
+ Here is the call graph for this function:

◆ isApplicable()

ILIAS\Setup\Objective\MigrationObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 126 of file MigrationObjective.php.

126  : bool
127  {
128  $this->migration->prepare($environment);
129 
130  return $this->migration->getRemainingAmountOfSteps() > 0;
131  }

◆ isNotable()

ILIAS\Setup\Objective\MigrationObjective::isNotable ( )

Defaults to 'true'.

Implements ILIAS\Setup\Objective.

Definition at line 60 of file MigrationObjective.php.

60  : bool
61  {
62  return true;
63  }

Field Documentation

◆ $migration

Setup Migration ILIAS\Setup\Objective\MigrationObjective::$migration
protected

◆ $steps

int ILIAS\Setup\Objective\MigrationObjective::$steps
protected

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