ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 38 of file class.ilAdvancedMDRecordTranslation.php.

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

44  {
45  global $DIC;
46 
47  $this->db = $DIC->database();
48 
49  $this->record_id = $record_id;
50  $this->title = $title;
51  $this->description = $description;
52  $this->lang_key = $lang_key;
53  $this->lang_default = $lang_default;
54  }
global $DIC
Definition: shib_login.php:22

Member Function Documentation

◆ delete()

ilAdvancedMDRecordTranslation::delete ( )

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

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

121  : void
122  {
123  $query = 'delete from ' . self::TABLE_NAME . ' ' .
124  'where record_id = ' . $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ' and ' .
125  'lang_code = ' . $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT);
126  $this->db->manipulate($query);
127  }
+ Here is the call graph for this function:

◆ getDescription()

ilAdvancedMDRecordTranslation::getDescription ( )
Returns
string

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

References $description.

Referenced by insert(), and update().

97  : string
98  {
99  return $this->description;
100  }
+ Here is the caller graph for this function:

◆ getLangDefault()

ilAdvancedMDRecordTranslation::getLangDefault ( )

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

References $lang_default.

71  : bool
72  {
73  return $this->lang_default;
74  }

◆ getLangKey()

ilAdvancedMDRecordTranslation::getLangKey ( )
Returns
string

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

References $lang_key.

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

105  : string
106  {
107  return $this->lang_key;
108  }
+ Here is the caller graph for this function:

◆ getRecordId()

ilAdvancedMDRecordTranslation::getRecordId ( )

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

References $record_id.

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

76  : int
77  {
78  return $this->record_id;
79  }
+ Here is the caller graph for this function:

◆ getTitle()

ilAdvancedMDRecordTranslation::getTitle ( )
Returns
string

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

References $title.

Referenced by insert(), and update().

89  : string
90  {
91  return $this->title;
92  }
+ Here is the caller graph for this function:

◆ insert()

ilAdvancedMDRecordTranslation::insert ( )

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

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

129  : void
130  {
131  $query = 'insert into ' . self::TABLE_NAME . ' (record_id, title, lang_code, description) ' .
132  'values ( ' .
133  $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ', ' .
134  $this->db->quote($this->getTitle(), ilDBConstants::T_TEXT) . ', ' .
135  $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT) . ', ' .
136  $this->db->quote($this->getDescription(), ilDBConstants::T_TEXT) . ' ' .
137  ')';
138  $this->db->manipulate($query);
139  }
+ Here is the call graph for this function:

◆ setDescription()

ilAdvancedMDRecordTranslation::setDescription ( string  $description)

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

References $description.

61  : void
62  {
63  $this->description = $description;
64  }

◆ setLangDefault()

ilAdvancedMDRecordTranslation::setLangDefault ( bool  $lang_default)

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

References $lang_default.

66  : void
67  {
68  $this->lang_default = $lang_default;
69  }

◆ setRecordId()

ilAdvancedMDRecordTranslation::setRecordId ( int  $record_id)

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

References $record_id.

81  : void
82  {
83  $this->record_id = $record_id;
84  }

◆ setTitle()

ilAdvancedMDRecordTranslation::setTitle ( string  $title)

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

References $title.

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

◆ update()

ilAdvancedMDRecordTranslation::update ( )

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

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

110  : void
111  {
112  $query = 'update ' . self::TABLE_NAME . ' ' .
113  'set title = ' . $this->db->quote($this->getTitle(), ilDBConstants::T_TEXT) . ', ' .
114  'description = ' . $this->db->quote($this->getDescription(), ilDBConstants::T_TEXT) . ' ' .
115  'where record_id = ' . $this->db->quote($this->getRecordId(), ilDBConstants::T_INTEGER) . ' ' .
116  'and lang_code = ' . $this->db->quote($this->getLangKey(), ilDBConstants::T_TEXT);
117 
118  $this->db->manipulate($query);
119  }
+ Here is the call graph for this function:

Field Documentation

◆ $db

ilDBInterface ilAdvancedMDRecordTranslation::$db
private

Definition at line 36 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 33 of file class.ilAdvancedMDRecordTranslation.php.

Referenced by __construct(), and getLangKey().

◆ $record_id

int ilAdvancedMDRecordTranslation::$record_id
private

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

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

◆ $title

string ilAdvancedMDRecordTranslation::$title
private

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