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.ilAdvancedMDFieldTranslation.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
9
class
ilAdvancedMDFieldTranslation
10
{
11
public
const
TABLE_NAME
=
'adv_md_field_int'
;
12
16
private
$field_id
;
17
21
private
$title
;
22
26
private
$description
;
27
31
private
$lang_key
;
32
33
37
private
$db
;
38
42
public
function
__construct
(
int
$field_id
,
string
$title
,
string
$description
,
string
$lang_key
)
43
{
44
global
$DIC
;
45
46
$this->db = $DIC->database();
47
48
$this->field_id =
$field_id
;
49
$this->title =
$title
;
50
$this->description =
$description
;
51
$this->lang_key =
$lang_key
;
52
}
53
57
public
function
setTitle
(
string
$title
) : void
58
{
59
$this->title =
$title
;
60
}
61
65
public
function
setDescription
(
string
$description
) : void
66
{
67
$this->description =
$description
;
68
}
69
70
74
public
function
getFieldId
() : int
75
{
76
return
$this->field_id
;
77
}
78
82
public
function
getTitle
() : string
83
{
84
return
$this->title
;
85
}
86
90
public
function
getDescription
() : string
91
{
92
return
$this->description
;
93
}
94
98
public
function
getLangKey
() : string
99
{
100
return
$this->lang_key
;
101
}
102
106
public
function
update
()
107
{
108
$query
=
'select * from '
. self::TABLE_NAME .
' '
.
109
'where field_id = '
. $this->db->quote($this->
getFieldId
(),
ilDBConstants::T_INTEGER
) .
' '
.
110
'and lang_code = '
. $this->db->quote($this->
getLangKey
(),
ilDBConstants::T_TEXT
) .
' '
;
111
$res
= $this->db->query(
$query
);
112
if
(!
$res
->numRows()) {
113
return
$this->
insert
();
114
}
115
116
$query
=
'update '
. self::TABLE_NAME .
' '
.
117
'set title = '
. $this->db->quote($this->
getTitle
(),
ilDBConstants::T_TEXT
) .
', '
.
118
'description = '
. $this->db->quote($this->
getDescription
(),
ilDBConstants::T_TEXT
) .
' '
.
119
'where field_id = '
. $this->db->quote($this->
getFieldId
(),
ilDBConstants::T_INTEGER
) .
' '
.
120
'and lang_code = '
. $this->db->quote($this->
getLangKey
(),
ilDBConstants::T_TEXT
);
121
122
$this->db->manipulate(
$query
);
123
}
124
125
public
function
delete
()
126
{
127
$query
=
'delete from '
. self::TABLE_NAME .
' '
.
128
'where field_id = '
. $this->db->quote($this->
getFieldId
(),
ilDBConstants::T_INTEGER
) .
' and '
.
129
'lang_code = '
. $this->db->quote($this->
getLangKey
(),
ilDBConstants::T_TEXT
);
130
$this->db->manipulate(
$query
);
131
}
132
133
public
function
insert
()
134
{
135
$query
=
'insert into '
. self::TABLE_NAME .
' (field_id, title, lang_code, description) '
.
136
'values ( '
.
137
$this->db->quote($this->
getFieldId
(),
ilDBConstants::T_INTEGER
) .
', '
.
138
$this->db->quote($this->
getTitle
() ,
ilDBConstants::T_TEXT
) .
', '
.
139
$this->db->quote($this->
getLangKey
(),
ilDBConstants::T_TEXT
) .
', '
.
140
$this->db->quote($this->
getDescription
(),
ilDBConstants::T_TEXT
) .
' '
.
141
')'
;
142
$this->db->manipulate(
$query
);
143
}
144
145
}
ilAdvancedMDFieldTranslation\$title
$title
Definition:
class.ilAdvancedMDFieldTranslation.php:21
ilAdvancedMDFieldTranslation\getLangKey
getLangKey()
Definition:
class.ilAdvancedMDFieldTranslation.php:98
ilAdvancedMDFieldTranslation\__construct
__construct(int $field_id, string $title, string $description, string $lang_key)
ilAdvancedMDFieldTranslation constructor.
Definition:
class.ilAdvancedMDFieldTranslation.php:42
ilAdvancedMDFieldTranslation\getDescription
getDescription()
Definition:
class.ilAdvancedMDFieldTranslation.php:90
ilAdvancedMDFieldTranslation\$field_id
$field_id
Definition:
class.ilAdvancedMDFieldTranslation.php:16
ilAdvancedMDFieldTranslation\$lang_key
$lang_key
Definition:
class.ilAdvancedMDFieldTranslation.php:31
ilDBConstants\T_TEXT
const T_TEXT
Definition:
class.ilDBConstants.php:41
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$DIC
global $DIC
Definition:
goto.php:24
ilAdvancedMDFieldTranslation\setDescription
setDescription(string $description)
Definition:
class.ilAdvancedMDFieldTranslation.php:65
ilAdvancedMDFieldTranslation\TABLE_NAME
const TABLE_NAME
Definition:
class.ilAdvancedMDFieldTranslation.php:11
ilAdvancedMDFieldTranslation\update
update()
update or insert entry
Definition:
class.ilAdvancedMDFieldTranslation.php:106
ilAdvancedMDFieldTranslation\$db
$db
Definition:
class.ilAdvancedMDFieldTranslation.php:37
$query
$query
Definition:
proxy_ylocal.php:13
ilAdvancedMDFieldTranslation\$description
$description
Definition:
class.ilAdvancedMDFieldTranslation.php:26
ilAdvancedMDFieldTranslation\getFieldId
getFieldId()
Definition:
class.ilAdvancedMDFieldTranslation.php:74
ilAdvancedMDFieldTranslation\insert
insert()
Definition:
class.ilAdvancedMDFieldTranslation.php:133
ilDBConstants\T_INTEGER
const T_INTEGER
Definition:
class.ilDBConstants.php:40
ilAdvancedMDFieldTranslation\setTitle
setTitle(string $title)
Definition:
class.ilAdvancedMDFieldTranslation.php:57
ilAdvancedMDFieldTranslation\getTitle
getTitle()
Definition:
class.ilAdvancedMDFieldTranslation.php:82
ilAdvancedMDFieldTranslation
Class ilAdvancedMDFieldTranslation.
Definition:
class.ilAdvancedMDFieldTranslation.php:9
Services
AdvancedMetaData
classes
Translation
class.ilAdvancedMDFieldTranslation.php
Generated on Thu Apr 3 2025 21:01:07 for ILIAS by
1.8.13 (using
Doxyfile
)