ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilMD5295Description.php
Go to the documentation of this file.
1
<?php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
24
31
include_once
'class.ilMD5295Base.php'
;
32
33
class
ilMD5295Description
extends
ilMD5295Base
34
{
35
// SET/GET
36
public
function
setDescription
($a_description)
37
{
38
$this->description = $a_description;
39
}
40
public
function
getDescription
()
41
{
42
return
$this->description;
43
}
44
public
function
setDescriptionLanguage
(&$lng_obj)
45
{
46
if
(is_object($lng_obj)) {
47
$this->description_language = $lng_obj;
48
}
49
}
50
public
function
&
getDescriptionLanguage
()
51
{
52
return
is_object($this->description_language) ? $this->description_language :
false
;
53
}
54
public
function
getDescriptionLanguageCode
()
55
{
56
return
is_object($this->description_language) ? $this->description_language->getLanguageCode() :
false
;
57
}
58
59
public
function
save
()
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
}
74
75
public
function
update
()
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
}
92
93
public
function
delete
()
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
}
108
109
110
public
function
__getFields
()
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
}
120
121
public
function
read
()
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
}
146
147
/*
148
* XML Export of all meta data
149
* @param object (xml writer) see class.ilMD52952XML.php
150
*
151
*/
152
public
function
toXML
(&$writer)
153
{
154
$writer->xmlElement(
155
'Description'
,
156
array(
'Language'
=> $this->
getDescriptionLanguageCode
() ?
157
$this->
getDescriptionLanguageCode
() :
158
'en'
),
159
$this->
getDescription
()
160
);
161
}
162
163
164
// STATIC
165
public
static
function
_getIds
($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
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
}
184
}
ilMD5295Base\getMetaId
getMetaId()
Definition:
class.ilMD5295Base.php:125
ilMD5295Base\getObjId
getObjId()
Definition:
class.ilMD5295Base.php:105
ilMD5295Base\getRBACId
getRBACId()
Definition:
class.ilMD5295Base.php:97
ilMD5295Base\getObjType
getObjType()
Definition:
class.ilMD5295Base.php:113
ilMD5295Description\_getIds
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
Definition:
class.ilMD5295Description.php:165
ilMD5295Base\setObjType
setObjType($a_type)
Definition:
class.ilMD5295Base.php:109
ilMD5295Description\save
save()
Definition:
class.ilMD5295Description.php:59
ilMD5295Base\getParentType
getParentType()
Definition:
class.ilMD5295Base.php:133
ilMD5295Description\getDescription
getDescription()
Definition:
class.ilMD5295Description.php:40
ilMD5295LanguageItem
Definition:
class.ilMD5295LanguageItem.php:32
ilMD5295Base\getParentId
getParentId()
Definition:
class.ilMD5295Base.php:141
ilMD5295Base\setParentType
setParentType($a_parent_type)
Definition:
class.ilMD5295Base.php:129
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilMD5295Description\toXML
toXML(&$writer)
Definition:
class.ilMD5295Description.php:152
ilMD5295Base\setParentId
setParentId($a_id)
Definition:
class.ilMD5295Base.php:137
ilMD5295Base
Definition:
class.ilMD5295Base.php:32
ilMD5295Base\setRBACId
setRBACId($a_id)
Definition:
class.ilMD5295Base.php:93
ilMD5295Base\setObjId
setObjId($a_id)
Definition:
class.ilMD5295Base.php:101
$DIC
global $DIC
Definition:
goto.php:24
ilMD5295Description\update
update()
Definition:
class.ilMD5295Description.php:75
ilMD5295Description\read
read()
Definition:
class.ilMD5295Description.php:121
$query
$query
Definition:
proxy_ylocal.php:13
ilMD5295Description\setDescription
setDescription($a_description)
Definition:
class.ilMD5295Description.php:36
ilMD5295Description\setDescriptionLanguage
setDescriptionLanguage(&$lng_obj)
Definition:
class.ilMD5295Description.php:44
ilMD5295Description
Definition:
class.ilMD5295Description.php:33
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:11
ilMD5295Description\getDescriptionLanguage
& getDescriptionLanguage()
Definition:
class.ilMD5295Description.php:50
ilMD5295Description\getDescriptionLanguageCode
getDescriptionLanguageCode()
Definition:
class.ilMD5295Description.php:54
ilMD5295Description\__getFields
__getFields()
Definition:
class.ilMD5295Description.php:110
ilMD5295Base\setMetaId
setMetaId($a_meta_id, $a_read_data=true)
Definition:
class.ilMD5295Base.php:117
Services
Migration
DBUpdate_5295
classes
class.ilMD5295Description.php
Generated on Wed Apr 9 2025 21:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)