ILIAS
Release_4_4_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilDataCollectionFieldProp.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15
class
ilDataCollectionFieldProp
16
{
17
protected
$id
;
// [int]
18
protected
$datatype_property_id
;
//[int]
19
protected
$value
;
//[string]
20
protected
$field_id
;
// [int]
21
22
29
public
function
__construct
($a_id = 0)
30
{
31
if
($a_id != 0)
32
{
33
$this->
id
= $a_id;
34
$this->
doRead
();
35
}
36
}
37
43
public
function
setId
($a_id)
44
{
45
$this->
id
= $a_id;
46
}
47
53
public
function
getId
()
54
{
55
return
$this->id
;
56
}
57
63
public
function
setDatatypePropertyId
($a_id)
64
{
65
$this->datatype_property_id = $a_id;
66
}
67
73
public
function
getDatatypePropertyId
()
74
{
75
return
$this->datatype_property_id
;
76
}
77
83
public
function
setValue
($a_value)
84
{
85
$this->value = $a_value;
86
}
87
93
public
function
getValue
()
94
{
95
return
$this->value
;
96
}
97
103
public
function
setFieldId
($a_id)
104
{
105
$this->field_id = $a_id;
106
}
107
113
public
function
getFieldId
()
114
{
115
return
$this->field_id
;
116
}
117
118
122
public
function
doRead
()
123
{
124
global $ilDB;
125
126
$query
=
"SELECT * FROM il_dcl_field_prop WHERE id = "
.$ilDB->quote($this->
getId
(),
"integer"
);
127
$set = $ilDB->query(
$query
);
128
$rec = $ilDB->fetchAssoc($set);
129
130
$this->
setDatatypePropertyId
($rec[
"property_id"
]);
131
$this->
setValue
($rec[
"value"
]);
132
$this->
setFieldId
($rec[
"field_id"
]);
133
134
}
135
136
140
public
function
doCreate
()
141
{
142
global $ilDB;
143
144
$id
= $ilDB->nextId(
"il_dcl_field_prop"
);
145
$this->
setId
(
$id
);
146
$query
=
"INSERT INTO il_dcl_field_prop ("
.
147
"id"
.
148
", datatype_prop_id"
.
149
", field_id"
.
150
", value"
.
151
" ) VALUES ("
.
152
$ilDB->quote($this->
getId
(),
"integer"
)
153
.
","
.$ilDB->quote($this->
getDatatypePropertyId
(),
"integer"
)
154
.
","
.$ilDB->quote($this->
getFieldId
(),
"integer"
)
155
.
","
.$ilDB->quote($this->
getValue
(),
"text"
)
156
.
")"
;
157
$ilDB->manipulate(
$query
);
158
}
159
160
164
public
function
doUpdate
()
165
{
166
global $ilDB;
167
168
$ilDB->update(
"il_dcl_field_prop"
, array(
169
"datatype_prop_id"
=> array(
"integer"
, $this->
getDatatypePropertyId
()),
170
"field_id"
=> array(
"integer"
, $this->
getFieldId
()),
171
"value"
=> array(
"text"
, $this->
getValue
())
172
), array(
173
"datatype_prop_id"
=> array(
"integer"
, $this->
getDatatypePropertyId
()),
174
"field_id"
=> array(
"integer"
, $this->
getFieldId
())
175
));
176
}
177
}
178
179
180
?>
Modules
DataCollection
classes
class.ilDataCollectionFieldProp.php
Generated on Wed Apr 27 2016 20:01:12 for ILIAS by
1.8.1.2 (using
Doxyfile
)