A HTML block allows to present simple HTML within a block. More...
Inheritance diagram for ilHtmlBlock:
Collaboration diagram for ilHtmlBlock:Public Member Functions | |
| __construct ($a_id=0) | |
| Constructor. | |
| setContent ($a_content) | |
| Set Content. | |
| getContent () | |
| Get Content. | |
| create () | |
| Create new item. | |
| read () | |
| Read item from database. | |
| update () | |
| Update item in database. | |
| delete () | |
| Delete item from database. | |
Protected Attributes | |
| $content | |
A HTML block allows to present simple HTML within a block.
Definition at line 32 of file class.ilHtmlBlock.php.
| ilHtmlBlock::__construct | ( | $ | a_id = 0 |
) |
Constructor.
| int | $a_id |
Reimplemented from ilCustomBlock.
Definition at line 42 of file class.ilHtmlBlock.php.
References read(), and ilCustomBlock::setId().
Here is the call graph for this function:| ilHtmlBlock::create | ( | ) |
Create new item.
Reimplemented from ilCustomBlock.
Definition at line 76 of file class.ilHtmlBlock.php.
References getContent(), and ilCustomBlock::getId().
{
global $ilDB;
parent::create();
$query = "INSERT INTO il_html_block (".
" id".
", content".
" ) VALUES (".
$ilDB->quote($this->getId())
.",".$ilDB->quote($this->getContent()).")";
$ilDB->query($query);
}
Here is the call graph for this function:| ilHtmlBlock::delete | ( | ) |
Delete item from database.
Reimplemented from ilCustomBlock.
Definition at line 134 of file class.ilHtmlBlock.php.
References ilCustomBlock::getId().
{
global $ilDB;
parent::delete();
$query = "DELETE FROM il_html_block".
" WHERE id = ".$ilDB->quote($this->getId());
$ilDB->query($query);
}
Here is the call graph for this function:| ilHtmlBlock::getContent | ( | ) |
Get Content.
Definition at line 67 of file class.ilHtmlBlock.php.
Referenced by create(), and update().
{
return $this->content;
}
Here is the caller graph for this function:| ilHtmlBlock::read | ( | ) |
Read item from database.
Reimplemented from ilCustomBlock.
Definition at line 97 of file class.ilHtmlBlock.php.
References ilCustomBlock::getId(), and setContent().
Referenced by __construct().
{
global $ilDB;
parent::read();
$query = "SELECT * FROM il_html_block WHERE id = ".
$ilDB->quote($this->getId());
$set = $ilDB->query($query);
$rec = $set->fetchRow(DB_FETCHMODE_ASSOC);
$this->setContent($rec["content"]);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilHtmlBlock::setContent | ( | $ | a_content | ) |
Set Content.
| string | $a_content HTML content of the block. |
Definition at line 57 of file class.ilHtmlBlock.php.
Referenced by read().
{
$this->content = $a_content;
}
Here is the caller graph for this function:| ilHtmlBlock::update | ( | ) |
Update item in database.
Reimplemented from ilCustomBlock.
Definition at line 116 of file class.ilHtmlBlock.php.
References getContent(), and ilCustomBlock::getId().
{
global $ilDB;
parent::update();
$query = "UPDATE il_html_block SET ".
" content = ".$ilDB->quote($this->getContent()).
" WHERE id = ".$ilDB->quote($this->getId());
$ilDB->query($query);
}
Here is the call graph for this function:ilHtmlBlock::$content [protected] |
Definition at line 35 of file class.ilHtmlBlock.php.
1.7.1