ILIAS  release_8 Revision v8.24
ilDBStepExecutionDBExistsObjective Class Reference
+ Inheritance diagram for ilDBStepExecutionDBExistsObjective:
+ Collaboration diagram for ilDBStepExecutionDBExistsObjective:

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 @inheritDoc More...
 

Detailed Description

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

Member Function Documentation

◆ achieve()

ilDBStepExecutionDBExistsObjective::achieve ( Setup\Environment  $environment)

Definition at line 46 of file class.ilDBStepExecutionDBExistsObjective.php.

46 : Setup\Environment
47 {
48 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
49 return $environment
50 ->withResource(
51 \ilDBStepExecutionDB::class,
53 $db,
54 fn () => new \DateTime()
55 )
56 );
57 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Setup\Environment\getResource().

+ Here is the call graph for this function:

◆ getHash()

ilDBStepExecutionDBExistsObjective::getHash ( )

Definition at line 24 of file class.ilDBStepExecutionDBExistsObjective.php.

24 : string
25 {
26 return hash("sha256", self::class);
27 }

◆ getLabel()

ilDBStepExecutionDBExistsObjective::getLabel ( )

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

29 : string
30 {
31 return "The execution log for database update steps exists.";
32 }

◆ getPreconditions()

ilDBStepExecutionDBExistsObjective::getPreconditions ( Setup\Environment  $environment)

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

39 : array
40 {
41 return [
42 new \ilDatabaseUpdatedObjective()
43 ];
44 }

◆ isApplicable()

ilDBStepExecutionDBExistsObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 62 of file class.ilDBStepExecutionDBExistsObjective.php.

62 : bool
63 {
64 $execution_db = $environment->getResource(\ilDBStepExecutionDB::class);
65 return is_null($execution_db);
66 }

◆ isNotable()

ilDBStepExecutionDBExistsObjective::isNotable ( )

Definition at line 34 of file class.ilDBStepExecutionDBExistsObjective.php.

34 : bool
35 {
36 return true;
37 }

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