ILIAS  release_7 Revision v7.30-3-g800a261c036
ilAdvancedMDRecordTranslation Class Reference

Class ilAdvancedMDRecordTranslation. More...

+ Collaboration diagram for ilAdvancedMDRecordTranslation:

Public Member Functions

 __construct (int $record_id, string $title, string $description, string $lang_key)
 ilAdvancedMDRecordTranslation constructor. More...
 
 setTitle (string $title)
 
 setDescription (string $description)
 
 setLangDefault (bool $lang_default)
 
 getRecordId ()
 
 setRecordId (int $record_id)
 
 getTitle ()
 
 getDescription ()
 
 getLangKey ()
 
 update ()
 
 delete ()
 
 insert ()
 

Data Fields

const TABLE_NAME = 'adv_md_record_int'
 

Private Attributes

 $record_id
 
 $title
 
 $description
 
 $lang_key
 
 $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMDRecordTranslation::__construct ( int  $record_id,
string  $title,
string  $description,
string  $lang_key 
)

ilAdvancedMDRecordTranslation constructor.

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

43 {
44 global $DIC;
45
46 $this->db = $DIC->database();
47
48 $this->record_id = $record_id;
49 $this->title = $title;
50 $this->description = $description;
51 $this->lang_key = $lang_key;
52 }
global $DIC
Definition: goto.php:24

References $description, $DIC, $lang_key, $record_id, and $title.

Member Function Documentation

◆ delete()

ilAdvancedMDRecordTranslation::delete ( )

Definition at line 128 of file class.ilAdvancedMDRecordTranslation.php.

129 {
130 $query = 'delete from ' . self::TABLE_NAME . ' ' .
131 'where record_id = ' . $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ' and ' .
132 'lang_code = ' . $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT);
133 $this->db->manipulate($query);
134 }
$query

References $query, getRecordId(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

+ Here is the call graph for this function:

◆ getDescription()

ilAdvancedMDRecordTranslation::getDescription ( )
Returns
string

Definition at line 103 of file class.ilAdvancedMDRecordTranslation.php.

103 : string
104 {
105 return $this->description;
106 }

References $description.

Referenced by insert(), and update().

+ Here is the caller graph for this function:

◆ getLangKey()

ilAdvancedMDRecordTranslation::getLangKey ( )
Returns
string

Definition at line 111 of file class.ilAdvancedMDRecordTranslation.php.

111 : string
112 {
113 return $this->lang_key;
114 }

References $lang_key.

Referenced by insert(), and update().

+ Here is the caller graph for this function:

◆ getRecordId()

ilAdvancedMDRecordTranslation::getRecordId ( )
Returns
int

Definition at line 82 of file class.ilAdvancedMDRecordTranslation.php.

82 : int
83 {
84 return $this->record_id;
85 }

References $record_id.

Referenced by delete(), insert(), and update().

+ Here is the caller graph for this function:

◆ getTitle()

ilAdvancedMDRecordTranslation::getTitle ( )
Returns
string

Definition at line 95 of file class.ilAdvancedMDRecordTranslation.php.

95 : string
96 {
97 return $this->title;
98 }

References $title.

Referenced by insert(), and update().

+ Here is the caller graph for this function:

◆ insert()

ilAdvancedMDRecordTranslation::insert ( )

Definition at line 136 of file class.ilAdvancedMDRecordTranslation.php.

137 {
138 $query = 'insert into ' . self::TABLE_NAME . ' (record_id, title, lang_code, description) ' .
139 'values ( ' .
140 $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ', ' .
141 $this->db->quote($this->getTitle() , ilDBConstants::T_TEXT) . ', ' .
142 $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT) . ', ' .
143 $this->db->quote($this->getDescription(), ilDBConstants::T_TEXT) . ' ' .
144 ')';
145 $this->db->manipulate($query);
146 }

References $query, getDescription(), getLangKey(), getRecordId(), getTitle(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

+ Here is the call graph for this function:

◆ setDescription()

ilAdvancedMDRecordTranslation::setDescription ( string  $description)
Parameters
string$description

Definition at line 65 of file class.ilAdvancedMDRecordTranslation.php.

65 : void
66 {
67 $this->description = $description;
68 }

References $description.

◆ setLangDefault()

ilAdvancedMDRecordTranslation::setLangDefault ( bool  $lang_default)
Parameters
bool$lang_default

Definition at line 73 of file class.ilAdvancedMDRecordTranslation.php.

73 : void
74 {
75 $this->lang_default = $lang_default;
76 }

◆ setRecordId()

ilAdvancedMDRecordTranslation::setRecordId ( int  $record_id)

Definition at line 87 of file class.ilAdvancedMDRecordTranslation.php.

87 : void
88 {
89 $this->record_id = $record_id;
90 }

References $record_id.

◆ setTitle()

ilAdvancedMDRecordTranslation::setTitle ( string  $title)
Parameters
string$title

Definition at line 57 of file class.ilAdvancedMDRecordTranslation.php.

57 : void
58 {
59 $this->title = $title;
60 }

References $title.

◆ update()

ilAdvancedMDRecordTranslation::update ( )

Definition at line 117 of file class.ilAdvancedMDRecordTranslation.php.

118 {
119 $query = 'update ' . self::TABLE_NAME . ' ' .
120 'set title = ' . $this->db->quote($this->getTitle(), ilDBConstants::T_TEXT) . ', ' .
121 'description = ' . $this->db->quote($this->getDescription(), ilDBConstants::T_TEXT) . ' ' .
122 'where record_id = ' . $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ' ' .
123 'and lang_code = ' . $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT);
124
125 $this->db->manipulate($query);
126 }

References $query, getDescription(), getLangKey(), getRecordId(), getTitle(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

+ Here is the call graph for this function:

Field Documentation

◆ $db

ilAdvancedMDRecordTranslation::$db
private

Definition at line 37 of file class.ilAdvancedMDRecordTranslation.php.

◆ $description

ilAdvancedMDRecordTranslation::$description
private

◆ $lang_key

ilAdvancedMDRecordTranslation::$lang_key
private

Definition at line 31 of file class.ilAdvancedMDRecordTranslation.php.

Referenced by __construct(), and getLangKey().

◆ $record_id

ilAdvancedMDRecordTranslation::$record_id
private

Definition at line 16 of file class.ilAdvancedMDRecordTranslation.php.

Referenced by __construct(), getRecordId(), and setRecordId().

◆ $title

ilAdvancedMDRecordTranslation::$title
private

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

Referenced by __construct(), getTitle(), and setTitle().

◆ TABLE_NAME

const ilAdvancedMDRecordTranslation::TABLE_NAME = 'adv_md_record_int'

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