ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMD5295Description Class Reference
+ Inheritance diagram for ilMD5295Description:
+ Collaboration diagram for ilMD5295Description:

Public Member Functions

 setDescription ($a_description)
 
 getDescription ()
 
 setDescriptionLanguage (&$lng_obj)
 
getDescriptionLanguage ()
 
 getDescriptionLanguageCode ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
- Public Member Functions inherited from ilMD5295Base
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

static _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 

Additional Inherited Members

- Data Fields inherited from ilMD5295Base
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMD5295Base
 $log
 

Detailed Description

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

Member Function Documentation

◆ __getFields()

ilMD5295Description::__getFields ( )

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

111 {
112 return array('rbac_id' => array('integer',$this->getRBACId()),
113 'obj_id' => array('integer',$this->getObjId()),
114 'obj_type' => array('text',$this->getObjType()),
115 'parent_type' => array('text',$this->getParentType()),
116 'parent_id' => array('integer',$this->getParentId()),
117 'description' => array('clob',$this->getDescription()),
118 'description_language' => array('text',$this->getDescriptionLanguageCode()));
119 }

References getDescription(), getDescriptionLanguageCode(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), ilMD5295Base\getParentId(), ilMD5295Base\getParentType(), and ilMD5295Base\getRBACId().

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getIds()

static ilMD5295Description::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)
static

Definition at line 165 of file class.ilMD5295Description.php.

166 {
167 global $DIC;
168
169 $ilDB = $DIC['ilDB'];
170
171 $query = "SELECT meta_description_id FROM il_meta_description " .
172 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) . " " .
173 "AND obj_id = " . $ilDB->quote($a_obj_id) . " " .
174 "AND parent_id = " . $ilDB->quote($a_parent_id) . " " .
175 "AND parent_type = " . $ilDB->quote($a_parent_type) . " " .
176 "ORDER BY meta_description_id";
177
178 $res = $ilDB->query($query);
179 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
180 $ids[] = $row->meta_description_id;
181 }
182 return $ids ? $ids : array();
183 }
$query
foreach($_POST as $key=> $value) $res
global $ilDB
$DIC
Definition: xapitoken.php:46

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMD5295Educational\getDescriptionIds(), and ilMD5295General\getDescriptionIds().

+ Here is the caller graph for this function:

◆ delete()

ilMD5295Description::delete ( )

Reimplemented from ilMD5295Base.

Definition at line 93 of file class.ilMD5295Description.php.

94 {
95 global $DIC;
96
97 $ilDB = $DIC['ilDB'];
98
99 if ($this->getMetaId()) {
100 $query = "DELETE FROM il_meta_description " .
101 "WHERE meta_description_id = " . $ilDB->quote($this->getMetaId(), 'integer');
102 $res = $ilDB->manipulate($query);
103
104 return true;
105 }
106 return false;
107 }

References $DIC, $ilDB, $query, $res, and ilMD5295Base\getMetaId().

+ Here is the call graph for this function:

◆ getDescription()

ilMD5295Description::getDescription ( )

Definition at line 40 of file class.ilMD5295Description.php.

41 {
42 return $this->description;
43 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ getDescriptionLanguage()

& ilMD5295Description::getDescriptionLanguage ( )

Definition at line 50 of file class.ilMD5295Description.php.

51 {
52 return is_object($this->description_language) ? $this->description_language : false;
53 }

◆ getDescriptionLanguageCode()

ilMD5295Description::getDescriptionLanguageCode ( )

Definition at line 54 of file class.ilMD5295Description.php.

55 {
56 return is_object($this->description_language) ? $this->description_language->getLanguageCode() : false;
57 }

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ read()

ilMD5295Description::read ( )

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

122 {
123 global $DIC;
124
125 $ilDB = $DIC['ilDB'];
126
127 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295LanguageItem.php';
128
129 if ($this->getMetaId()) {
130 $query = "SELECT * FROM il_meta_description " .
131 "WHERE meta_description_id = " . $ilDB->quote($this->getMetaId(), 'integer');
132
133 $res = $this->db->query($query);
134 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
135 $this->setRBACId($row->rbac_id);
136 $this->setObjId($row->obj_id);
137 $this->setObjType($row->obj_type);
138 $this->setParentId($row->parent_id);
139 $this->setParentType($row->parent_type);
140 $this->setDescription($row->description);
141 $this->setDescriptionLanguage(new ilMD5295LanguageItem($row->description_language));
142 }
143 }
144 return true;
145 }
setParentType($a_parent_type)

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ilMD5295Base\getMetaId(), setDescription(), setDescriptionLanguage(), ilMD5295Base\setObjId(), ilMD5295Base\setObjType(), ilMD5295Base\setParentId(), ilMD5295Base\setParentType(), and ilMD5295Base\setRBACId().

+ Here is the call graph for this function:

◆ save()

ilMD5295Description::save ( )

Reimplemented from ilMD5295Base.

Definition at line 59 of file class.ilMD5295Description.php.

60 {
61 global $DIC;
62
63 $ilDB = $DIC['ilDB'];
64
65 $fields = $this->__getFields();
66 $fields['meta_description_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_description'));
67
68 if ($this->db->insert('il_meta_description', $fields)) {
69 $this->setMetaId($next_id);
70 return $this->getMetaId();
71 }
72 return false;
73 }
setMetaId($a_meta_id, $a_read_data=true)

References $DIC, $ilDB, __getFields(), ilMD5295Base\getMetaId(), and ilMD5295Base\setMetaId().

+ Here is the call graph for this function:

◆ setDescription()

ilMD5295Description::setDescription (   $a_description)

Definition at line 36 of file class.ilMD5295Description.php.

37 {
38 $this->description = $a_description;
39 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDescriptionLanguage()

ilMD5295Description::setDescriptionLanguage ( $lng_obj)

Definition at line 44 of file class.ilMD5295Description.php.

45 {
46 if (is_object($lng_obj)) {
47 $this->description_language = $lng_obj;
48 }
49 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toXML()

ilMD5295Description::toXML ( $writer)

Reimplemented from ilMD5295Base.

Definition at line 152 of file class.ilMD5295Description.php.

153 {
154 $writer->xmlElement(
155 'Description',
156 array('Language' => $this->getDescriptionLanguageCode() ?
158 'en'),
159 $this->getDescription()
160 );
161 }

References getDescription(), and getDescriptionLanguageCode().

+ Here is the call graph for this function:

◆ update()

ilMD5295Description::update ( )

Reimplemented from ilMD5295Base.

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

76 {
77 global $DIC;
78
79 $ilDB = $DIC['ilDB'];
80
81 if ($this->getMetaId()) {
82 if ($this->db->update(
83 'il_meta_description',
84 $this->__getFields(),
85 array("meta_description_id" => array('integer',$this->getMetaId()))
86 )) {
87 return true;
88 }
89 }
90 return false;
91 }

References $DIC, $ilDB, and ilMD5295Base\getMetaId().

+ Here is the call graph for this function:

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