ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilExternalFeedBlock.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
ilExternalFeedBlock
extends
ilCustomBlock
13
{
14
15
protected
$feed_url
;
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
setFeedUrl
($a_feed_url)
38
{
39
$this->feed_url = $a_feed_url;
40
}
41
47
public
function
getFeedUrl
()
48
{
49
return
$this->feed_url
;
50
}
51
56
public
function
create
()
57
{
58
global
$ilDB
,
$ilLog
;
59
60
parent::create();
61
62
$query
=
"INSERT INTO il_external_feed_block ("
.
63
" id"
.
64
", feed_url"
.
65
" ) VALUES ("
.
66
$ilDB->quote($this->
getId
(),
"integer"
)
67
.
","
.$ilDB->quote($this->
getFeedUrl
(),
"text"
).
")"
;
68
$ilDB->manipulate(
$query
);
69
70
}
71
76
public
function
read
()
77
{
78
global
$ilDB
;
79
80
parent::read();
81
82
$query
=
"SELECT * FROM il_external_feed_block WHERE id = "
.
83
$ilDB->quote($this->
getId
(),
"integer"
);
84
$set = $ilDB->query(
$query
);
85
$rec = $ilDB->fetchAssoc($set);
86
87
$this->
setFeedUrl
($rec[
"feed_url"
]);
88
89
}
90
95
public
function
update
()
96
{
97
global
$ilDB
;
98
99
parent::update();
100
101
$query
=
"UPDATE il_external_feed_block SET "
.
102
" feed_url = "
.$ilDB->quote($this->
getFeedUrl
(),
"text"
).
103
" WHERE id = "
.$ilDB->quote($this->
getId
(),
"integer"
);
104
105
$ilDB->manipulate(
$query
);
106
107
}
108
113
public
function
delete
()
114
{
115
global
$ilDB
;
116
117
parent::delete();
118
119
$query
=
"DELETE FROM il_external_feed_block"
.
120
" WHERE id = "
.$ilDB->quote($this->
getId
(),
"integer"
);
121
122
$ilDB->manipulate(
$query
);
123
124
}
125
126
127
}
128
?>
ilExternalFeedBlock\update
update()
Update item in database.
Definition:
class.ilExternalFeedBlock.php:95
ilCustomBlock\getId
getId()
Get Id.
Definition:
class.ilCustomBlock.php:52
ilCustomBlock\setId
setId($a_id)
Set Id.
Definition:
class.ilCustomBlock.php:42
ilExternalFeedBlock\setFeedUrl
setFeedUrl($a_feed_url)
Set FeedUrl.
Definition:
class.ilExternalFeedBlock.php:37
ilExternalFeedBlock\__construct
__construct($a_id=0)
Constructor.
Definition:
class.ilExternalFeedBlock.php:22
$query
$query
Definition:
examplelayouts.sql.php:24
ilExternalFeedBlock
Custom block for external feeds.
Definition:
class.ilExternalFeedBlock.php:12
ilExternalFeedBlock\getFeedUrl
getFeedUrl()
Get FeedUrl.
Definition:
class.ilExternalFeedBlock.php:47
$ilLog
$ilLog
Definition:
inc.setup_header.php:130
ilCustomBlock
This is the super class of all custom blocks.
Definition:
class.ilCustomBlock.php:11
ilExternalFeedBlock\read
read()
Read item from database.
Definition:
class.ilExternalFeedBlock.php:76
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilExternalFeedBlock\create
create()
Create new item.
Definition:
class.ilExternalFeedBlock.php:56
php
ilExternalFeedBlock\$feed_url
$feed_url
Definition:
class.ilExternalFeedBlock.php:15
Services
Block
classes
class.ilExternalFeedBlock.php
Generated on Fri Jan 17 2025 19:01:08 for ILIAS by
1.8.13 (using
Doxyfile
)