ILIAS
release_4-3 Revision
◀ 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.ilHtmlBlock.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once(
"./Services/Block/classes/class.ilCustomBlock.php"
);
5
12
class
ilHtmlBlock
extends
ilCustomBlock
13
{
14
15
protected
$content
;
16
22
public
function
__construct
($a_id = 0)
23
{
24
if
($a_id > 0)
25
{
26
$this->
setId
($a_id);
27
$this->
read
();
28
}
29
30
}
31
37
public
function
setContent
($a_content)
38
{
39
$this->content = $a_content;
40
}
41
47
public
function
getContent
()
48
{
49
return
$this->content
;
50
}
51
56
public
function
create
()
57
{
58
global $ilDB;
59
60
parent::create
();
61
62
$query
=
"INSERT INTO il_html_block ("
.
63
" id"
.
64
", content"
.
65
" ) VALUES ("
.
66
$ilDB->quote($this->
getId
(),
"integer"
)
67
.
","
.$ilDB->quote($this->
getContent
(),
"text"
).
")"
;
68
$ilDB->manipulate(
$query
);
69
70
71
}
72
77
public
function
read
()
78
{
79
global $ilDB;
80
81
parent::read
();
82
83
$query
=
"SELECT * FROM il_html_block WHERE id = "
.
84
$ilDB->quote($this->
getId
(),
"integer"
);
85
$set = $ilDB->query(
$query
);
86
$rec = $ilDB->fetchAssoc($set);
87
88
$this->
setContent
($rec[
"content"
]);
89
90
}
91
96
public
function
update
()
97
{
98
global $ilDB;
99
100
parent::update
();
101
102
$query
=
"UPDATE il_html_block SET "
.
103
" content = "
.$ilDB->quote($this->
getContent
(),
"text"
).
104
" WHERE id = "
.$ilDB->quote($this->
getId
(),
"integer"
);
105
106
$ilDB->manipulate(
$query
);
107
108
}
109
114
public
function
delete
()
115
{
116
global $ilDB;
117
118
parent::delete
();
119
120
$query
=
"DELETE FROM il_html_block"
.
121
" WHERE id = "
.$ilDB->quote($this->
getId
(),
"integer"
);
122
123
$ilDB->manipulate(
$query
);
124
125
}
126
127
128
}
129
?>
Services
Block
classes
class.ilHtmlBlock.php
Generated on Sat Apr 30 2016 19:00:51 for ILIAS by
1.8.1.2 (using
Doxyfile
)