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

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 Add a column to il_md_cpr_selections for the full name of the licence. More...
 
 step_2 ()
 Add a column to il_md_cpr_selections for the link to the licence. More...
 
 step_3 ()
 Add a column to il_md_cpr_selections for the link to the licence's image. More...
 
 step_4 ()
 Add a column to il_md_cpr_selections for the alt text of the licence's image. More...
 
 step_5 ()
 Add a column to il_md_cpr_selections to track which licences have been migrated. More...
 
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

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

Member Function Documentation

◆ prepare()

ilMDCopyrightUpdateSteps::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.ilMDCopyrightUpdateSteps.php.

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

References $db.

◆ step_1()

ilMDCopyrightUpdateSteps::step_1 ( )

Add a column to il_md_cpr_selections for the full name of the licence.

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

33 : void
34 {
35 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'full_name')) {
36 $this->db->addTableColumn(
37 'il_md_cpr_selections',
38 'full_name',
39 ['type' => ilDBConstants::T_CLOB]
40 );
41 }
42 }

References ilDBConstants\T_CLOB.

◆ step_2()

ilMDCopyrightUpdateSteps::step_2 ( )

Add a column to il_md_cpr_selections for the link to the licence.

Definition at line 47 of file class.ilMDCopyrightUpdateSteps.php.

47 : void
48 {
49 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'link')) {
50 $this->db->addTableColumn(
51 'il_md_cpr_selections',
52 'link',
53 ['type' => ilDBConstants::T_CLOB]
54 );
55 }
56 }

References ilDBConstants\T_CLOB.

◆ step_3()

ilMDCopyrightUpdateSteps::step_3 ( )

Add a column to il_md_cpr_selections for the link to the licence's image.

Definition at line 61 of file class.ilMDCopyrightUpdateSteps.php.

61 : void
62 {
63 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'image_link')) {
64 $this->db->addTableColumn(
65 'il_md_cpr_selections',
66 'image_link',
67 ['type' => ilDBConstants::T_CLOB]
68 );
69 }
70 }

References ilDBConstants\T_CLOB.

◆ step_4()

ilMDCopyrightUpdateSteps::step_4 ( )

Add a column to il_md_cpr_selections for the alt text of the licence's image.

Definition at line 75 of file class.ilMDCopyrightUpdateSteps.php.

75 : void
76 {
77 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'alt_text')) {
78 $this->db->addTableColumn(
79 'il_md_cpr_selections',
80 'alt_text',
81 ['type' => ilDBConstants::T_CLOB]
82 );
83 }
84 }

References ilDBConstants\T_CLOB.

◆ step_5()

ilMDCopyrightUpdateSteps::step_5 ( )

Add a column to il_md_cpr_selections to track which licences have been migrated.

Definition at line 89 of file class.ilMDCopyrightUpdateSteps.php.

89 : void
90 {
91 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'migrated')) {
92 $this->db->addTableColumn(
93 'il_md_cpr_selections',
94 'migrated',
95 [
97 'length' => 4,
98 'default' => 0
99 ]
100 );
101 }
102 }

References ilDBConstants\T_INTEGER.

Field Documentation

◆ $db

ilDBInterface ilMDCopyrightUpdateSteps::$db
protected

Definition at line 23 of file class.ilMDCopyrightUpdateSteps.php.

Referenced by prepare().


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