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

Public Member Functions

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

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.ilPortfolioDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ILIAS\Portfolio\Setup\ilPortfolioDBUpdateSteps::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.ilPortfolioDBUpdateSteps.php.

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

References ILIAS\Portfolio\Setup\ilPortfolioDBUpdateSteps\$db.

◆ step_1()

ILIAS\Portfolio\Setup\ilPortfolioDBUpdateSteps::step_1 ( )

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

33 : void
34 {
35 $db = $this->db;
36 if (!$db->tableExists('prtf_role_assignment')) {
37 $fields = [
38 'role_id' => [
39 'type' => 'integer',
40 'length' => 4,
41 'notnull' => true,
42 'default' => 0
43 ],
44 'template_ref_id' => [
45 'type' => 'integer',
46 'length' => 4,
47 'notnull' => true,
48 'default' => 0
49 ]
50 ];
51 $db->createTable('prtf_role_assignment', $fields);
52 $db->addPrimaryKey('prtf_role_assignment', ['role_id', 'template_ref_id']);
53 }
54 }
tableExists(string $table_name)
createTable(string $table_name, array $fields, bool $drop_table=false, bool $ignore_erros=false)
addPrimaryKey(string $table_name, array $primary_keys)

References ILIAS\Portfolio\Setup\ilPortfolioDBUpdateSteps\$db, ilDBInterface\addPrimaryKey(), ilDBInterface\createTable(), and ilDBInterface\tableExists().

+ Here is the call graph for this function:

◆ step_2()

ILIAS\Portfolio\Setup\ilPortfolioDBUpdateSteps::step_2 ( )

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

56 : void
57 {
58 $db = $this->db;
60 "DELETE FROM usr_portfolio_page WHERE " .
61 " type = %s",
62 ["integer"],
63 [2]
64 );
65 }
manipulateF(string $query, array $types, array $values)

References ILIAS\Portfolio\Setup\ilPortfolioDBUpdateSteps\$db, and ilDBInterface\manipulateF().

+ Here is the call graph for this function:

Field Documentation

◆ $db


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