ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Help\Setup\ilHelpDBUpdateSteps Class Reference
+ Inheritance diagram for ILIAS\Help\Setup\ilHelpDBUpdateSteps:
+ Collaboration diagram for ILIAS\Help\Setup\ilHelpDBUpdateSteps:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 21 of file class.ilHelpDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ILIAS\Help\Setup\ilHelpDBUpdateSteps::prepare ( \ilDBInterface  $db)

Prepare the execution of the steps.

Do not use anything from the globals or the DIC inside your steps, only use the instance of the database provided here.

Implements ilDatabaseUpdateSteps.

Definition at line 25 of file class.ilHelpDBUpdateSteps.php.

25 : void
26 {
27 $this->db = $db;
28 }

References ILIAS\Help\Setup\ilHelpDBUpdateSteps\$db.

◆ step_1()

ILIAS\Help\Setup\ilHelpDBUpdateSteps::step_1 ( )

Definition at line 30 of file class.ilHelpDBUpdateSteps.php.

30 : void
31 {
32 if (!$this->db->tableColumnExists('help_module', 'order_nr')) {
33 $this->db->addTableColumn('help_module', 'order_nr', array(
34 'type' => 'integer',
35 'notnull' => true,
36 'length' => 4,
37 'default' => 0
38 ));
39 }
40 }

◆ step_2()

ILIAS\Help\Setup\ilHelpDBUpdateSteps::step_2 ( )

Definition at line 42 of file class.ilHelpDBUpdateSteps.php.

42 : void
43 {
44 if (!$this->db->tableColumnExists('help_module', 'active')) {
45 $this->db->addTableColumn('help_module', 'active', array(
46 'type' => 'integer',
47 'notnull' => true,
48 'length' => 1,
49 'default' => 0
50 ));
51 }
52 }

◆ step_3()

ILIAS\Help\Setup\ilHelpDBUpdateSteps::step_3 ( )

Definition at line 54 of file class.ilHelpDBUpdateSteps.php.

54 : void
55 {
56 $set = $this->db->queryF(
57 "SELECT value FROM settings " .
58 " WHERE module = %s AND keyword = %s",
59 ["text", "text"],
60 ["common", "help_module"]
61 );
62 if ($rec = $this->db->fetchAssoc($set)) {
63 $id = (int) $rec["value"];
64 if ($id > 0) {
65 $this->db->update(
66 "help_module",
67 [
68 "active" => ["integer", 1]
69 ],
70 [ // where
71 "id" => ["integer", $id]
72 ]
73 );
74 }
75 }
76 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ step_4()

ILIAS\Help\Setup\ilHelpDBUpdateSteps::step_4 ( )

Definition at line 78 of file class.ilHelpDBUpdateSteps.php.

78 : void
79 {
80 if (!$this->db->tableColumnExists('help_map', 'full_id')) {
81 $this->db->addTableColumn('help_map', 'full_id', array(
82 'type' => 'text',
83 'length' => 1000,
84 'default' => ""
85 ));
86 }
87 }

Field Documentation

◆ $db

ilDBInterface ILIAS\Help\Setup\ilHelpDBUpdateSteps::$db
protected

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