ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables 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)
 MigrationObjective constructor. More...
 
 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

 $migration
 
 $steps
 

Detailed Description

handles a Migration

Definition at line 10 of file MigrationObjective.php.

Constructor & Destructor Documentation

◆ __construct()

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

MigrationObjective constructor.

Parameters
Setup\Migration$migration

Definition at line 25 of file MigrationObjective.php.

References ILIAS\Setup\Objective\MigrationObjective\$migration, and ILIAS\Setup\Objective\MigrationObjective\$steps.

26  {
27  $this->migration = $migration;
28  $this->steps = $steps ?? $migration->getDefaultAmountOfStepsPerRun();
29  }

Member Function Documentation

◆ getHash()

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

Uses hashed Path.

Implements ILIAS\Setup\Objective.

Definition at line 35 of file MigrationObjective.php.

35  : string
36  {
37  return hash("sha256", self::class . '' . get_class($this->migration));
38  }

◆ getLabel()

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

Implements ILIAS\Setup\Objective.

Definition at line 43 of file MigrationObjective.php.

43  : string
44  {
45  return $this->migration->getLabel();
46  }

◆ getPreconditions()

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

Definition at line 60 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.

60  : array
61  {
62  return $this->migration->getPreconditions($environment);
63  }
+ Here is the call graph for this function:

◆ isApplicable()

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

Definition at line 118 of file MigrationObjective.php.

118  : bool
119  {
120  $this->migration->prepare($environment);
121 
122  return $this->migration->getRemainingAmountOfSteps() > 0;
123  }

◆ isNotable()

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

Defaults to 'true'.

Implements ILIAS\Setup\Objective.

Definition at line 52 of file MigrationObjective.php.

52  : bool
53  {
54  return true;
55  }

Field Documentation

◆ $migration

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

◆ $steps

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

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