ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Object\Setup\ilObjectDBUpdateSteps Class Reference
+ Inheritance diagram for ILIAS\Object\Setup\ilObjectDBUpdateSteps:
+ Collaboration diagram for ILIAS\Object\Setup\ilObjectDBUpdateSteps:

Public Member Functions

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

Protected Attributes

ilDBInterface $db
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ prepare()

ILIAS\Object\Setup\ilObjectDBUpdateSteps::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 28 of file class.ilObjectDBUpdateSteps.php.

References ILIAS\Object\Setup\ilObjectDBUpdateSteps\$db.

28  : void
29  {
30  $this->db = $db;
31  }

◆ step_1()

ILIAS\Object\Setup\ilObjectDBUpdateSteps::step_1 ( )

Definition at line 33 of file class.ilObjectDBUpdateSteps.php.

References ilDBConstants\T_TEXT.

33  : void
34  {
35  $field = [
36  "type" => \ilDBConstants::T_TEXT,
37  "length" => 255,
38  "notnull" => false
39  ];
40 
41  $this->db->modifyTableColumn("object_translation", "title", $field);
42  }

◆ step_2()

ILIAS\Object\Setup\ilObjectDBUpdateSteps::step_2 ( )

Definition at line 44 of file class.ilObjectDBUpdateSteps.php.

44  : void
45  {
46  if ($this->db->tableExists("il_object_def")) {
47  $query = "UPDATE il_object_def SET " . PHP_EOL
48  . " component = REPLACE(component, 'Modules', 'components/ILIAS'), " . PHP_EOL
49  . " location = REPLACE(location, 'Modules', 'components/ILIAS')" . PHP_EOL
50  . " WHERE component LIKE ('Modules/%')";
51 
52  $this->db->manipulate($query);
53  }
54  }

◆ step_3()

ILIAS\Object\Setup\ilObjectDBUpdateSteps::step_3 ( )

Definition at line 56 of file class.ilObjectDBUpdateSteps.php.

56  : void
57  {
58  $query = "UPDATE il_object_def SET " . PHP_EOL
59  . " component = REPLACE(component, 'Services', 'components/ILIAS'), " . PHP_EOL
60  . " location = REPLACE(location, 'Services', 'components/ILIAS')" . PHP_EOL
61  . " WHERE component LIKE ('Services/%')";
62 
63  $this->db->manipulate($query);
64  }

◆ step_4()

ILIAS\Object\Setup\ilObjectDBUpdateSteps::step_4 ( )

Definition at line 66 of file class.ilObjectDBUpdateSteps.php.

66  : void
67  {
68  $query = "UPDATE il_object_def SET " . PHP_EOL
69  . " component = REPLACE(component, 'Language', 'Language_'), " . PHP_EOL
70  . " location = REPLACE(location, '/classes', '_/classes')" . PHP_EOL
71  . " WHERE component LIKE ('%Language')";
72 
73  $this->db->manipulate($query);
74  }

◆ step_5()

ILIAS\Object\Setup\ilObjectDBUpdateSteps::step_5 ( )

Definition at line 76 of file class.ilObjectDBUpdateSteps.php.

76  : void
77  {
78  $query = "UPDATE il_object_def SET " . PHP_EOL
79  . " component = REPLACE(component, 'Language_', 'Language'), " . PHP_EOL
80  . " location = REPLACE(location, '_/classes', '/classes')" . PHP_EOL
81  . " WHERE component LIKE ('%Language')";
82 
83  $this->db->manipulate($query);
84  }

Field Documentation

◆ $db

ilDBInterface ILIAS\Object\Setup\ilObjectDBUpdateSteps::$db
protected

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