ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

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

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

Member Function Documentation

◆ delete()

ilAdvancedMDRecordTranslation::delete ( )

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

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

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
+ Here is the call graph for this function:

◆ getDescription()

ilAdvancedMDRecordTranslation::getDescription ( )
Returns
string

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

References $description.

Referenced by insert(), and update().

83  : string
84  {
85  return $this->description;
86  }
+ Here is the caller graph for this function:

◆ getLangDefault()

ilAdvancedMDRecordTranslation::getLangDefault ( )

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

References $lang_default.

57  : bool
58  {
59  return $this->lang_default;
60  }

◆ getLangKey()

ilAdvancedMDRecordTranslation::getLangKey ( )
Returns
string

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

References $lang_key.

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

91  : string
92  {
93  return $this->lang_key;
94  }
+ Here is the caller graph for this function:

◆ getRecordId()

ilAdvancedMDRecordTranslation::getRecordId ( )

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

References $record_id.

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

62  : int
63  {
64  return $this->record_id;
65  }
+ Here is the caller graph for this function:

◆ getTitle()

ilAdvancedMDRecordTranslation::getTitle ( )
Returns
string

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

References $title.

Referenced by insert(), and update().

75  : string
76  {
77  return $this->title;
78  }
+ Here is the caller graph for this function:

◆ insert()

ilAdvancedMDRecordTranslation::insert ( )

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

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

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  }
$query
+ Here is the call graph for this function:

◆ setDescription()

ilAdvancedMDRecordTranslation::setDescription ( string  $description)

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

References $description.

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

◆ setLangDefault()

ilAdvancedMDRecordTranslation::setLangDefault ( bool  $lang_default)

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

References $lang_default.

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

◆ setRecordId()

ilAdvancedMDRecordTranslation::setRecordId ( int  $record_id)

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

References $record_id.

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

◆ setTitle()

ilAdvancedMDRecordTranslation::setTitle ( string  $title)

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

References $title.

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

◆ update()

ilAdvancedMDRecordTranslation::update ( )

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

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

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  }
$query
+ 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: