ILIAS  release_8 Revision v8.24
ilAdvancedMDRecordTranslation Class Reference

Class ilAdvancedMDRecordTranslation. More...

+ Collaboration diagram for ilAdvancedMDRecordTranslation:

Public Member Functions

 __construct (int $record_id, string $title, string $description, string $lang_key, bool $lang_default=false)
 
 setTitle (string $title)
 
 setDescription (string $description)
 
 setLangDefault (bool $lang_default)
 
 getLangDefault ()
 
 getRecordId ()
 
 setRecordId (int $record_id)
 
 getTitle ()
 
 getDescription ()
 
 getLangKey ()
 
 update ()
 
 delete ()
 
 insert ()
 

Data Fields

const TABLE_NAME = 'adv_md_record_int'
 

Private Attributes

int $record_id
 
string $title
 
string $description
 
string $lang_key
 
bool $lang_default = false
 
ilDBInterface $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMDRecordTranslation::__construct ( int  $record_id,
string  $title,
string  $description,
string  $lang_key,
bool  $lang_default = false 
)

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

30 {
31 global $DIC;
32
33 $this->db = $DIC->database();
34
35 $this->record_id = $record_id;
36 $this->title = $title;
37 $this->description = $description;
38 $this->lang_key = $lang_key;
39 $this->lang_default = $lang_default;
40 }
global $DIC
Definition: feed.php:28

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

Member Function Documentation

◆ delete()

ilAdvancedMDRecordTranslation::delete ( )

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

107 : void
108 {
109 $query = 'delete from ' . self::TABLE_NAME . ' ' .
110 'where record_id = ' . $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ' and ' .
111 'lang_code = ' . $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT);
112 $this->db->manipulate($query);
113 }
$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 83 of file class.ilAdvancedMDRecordTranslation.php.

83 : string
84 {
85 return $this->description;
86 }

References $description.

Referenced by insert(), and update().

+ Here is the caller graph for this function:

◆ getLangDefault()

ilAdvancedMDRecordTranslation::getLangDefault ( )

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

57 : bool
58 {
60 }

References $lang_default.

◆ getLangKey()

ilAdvancedMDRecordTranslation::getLangKey ( )
Returns
string

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

91 : string
92 {
93 return $this->lang_key;
94 }

References $lang_key.

Referenced by insert(), and update().

+ Here is the caller graph for this function:

◆ getRecordId()

ilAdvancedMDRecordTranslation::getRecordId ( )

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

62 : int
63 {
64 return $this->record_id;
65 }

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 75 of file class.ilAdvancedMDRecordTranslation.php.

75 : string
76 {
77 return $this->title;
78 }

References $title.

Referenced by insert(), and update().

+ Here is the caller graph for this function:

◆ insert()

ilAdvancedMDRecordTranslation::insert ( )

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

115 : void
116 {
117 $query = 'insert into ' . self::TABLE_NAME . ' (record_id, title, lang_code, description) ' .
118 'values ( ' .
119 $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ', ' .
120 $this->db->quote($this->getTitle(), ilDBConstants::T_TEXT) . ', ' .
121 $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT) . ', ' .
122 $this->db->quote($this->getDescription(), ilDBConstants::T_TEXT) . ' ' .
123 ')';
124 $this->db->manipulate($query);
125 }

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)

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

47 : void
48 {
49 $this->description = $description;
50 }

References $description.

◆ setLangDefault()

ilAdvancedMDRecordTranslation::setLangDefault ( bool  $lang_default)

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

52 : void
53 {
54 $this->lang_default = $lang_default;
55 }

References $lang_default.

◆ setRecordId()

ilAdvancedMDRecordTranslation::setRecordId ( int  $record_id)

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

67 : void
68 {
69 $this->record_id = $record_id;
70 }

References $record_id.

◆ setTitle()

ilAdvancedMDRecordTranslation::setTitle ( string  $title)

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

42 : void
43 {
44 $this->title = $title;
45 }

References $title.

◆ update()

ilAdvancedMDRecordTranslation::update ( )

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

96 : void
97 {
98 $query = 'update ' . self::TABLE_NAME . ' ' .
99 'set title = ' . $this->db->quote($this->getTitle(), ilDBConstants::T_TEXT) . ', ' .
100 'description = ' . $this->db->quote($this->getDescription(), ilDBConstants::T_TEXT) . ' ' .
101 'where record_id = ' . $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ' ' .
102 'and lang_code = ' . $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT);
103
104 $this->db->manipulate($query);
105 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $db

ilDBInterface ilAdvancedMDRecordTranslation::$db
private

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

◆ $description

string ilAdvancedMDRecordTranslation::$description
private

◆ $lang_default

bool ilAdvancedMDRecordTranslation::$lang_default = false
private

◆ $lang_key

string ilAdvancedMDRecordTranslation::$lang_key
private

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

Referenced by __construct(), and getLangKey().

◆ $record_id

int ilAdvancedMDRecordTranslation::$record_id
private

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

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

◆ $title

string ilAdvancedMDRecordTranslation::$title
private

Definition at line 17 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: