ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilHtmlBlock Class Reference

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.
- Public Member Functions inherited from ilCustomBlock
 setId ($a_id)
 Set Id.
 getId ()
 Get Id.
 setContextObjId ($a_context_obj_id)
 Set ContextObjId.
 getContextObjId ()
 Get ContextObjId.
 setContextObjType ($a_context_obj_type)
 Set ContextObjType.
 getContextObjType ()
 Get ContextObjType.
 setContextSubObjId ($a_context_sub_obj_id)
 Set ContextSubObjId.
 getContextSubObjId ()
 Get ContextSubObjId.
 setContextSubObjType ($a_context_sub_obj_type)
 Set ContextSubObjType.
 getContextSubObjType ()
 Get ContextSubObjType.
 setType ($a_type)
 Set Type.
 getType ()
 Get Type.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 querygetBlocksForContext ()
 Query getBlocksForContext.
 queryBlocksForContext ()
 Query BlocksForContext.
 queryTitleForId ()
 Query TitleForId.
 queryCntBlockForContext ()
 Query CntBlockForContext.

Protected Attributes

 $content
- Protected Attributes inherited from ilCustomBlock
 $id
 $context_obj_id
 $context_obj_type
 $context_sub_obj_id
 $context_sub_obj_type
 $type
 $title

Detailed Description

A HTML block allows to present simple HTML within a block.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilHtmlBlock.php.

Constructor & Destructor Documentation

ilHtmlBlock::__construct (   $a_id = 0)

Constructor.

Parameters
int$a_id

Reimplemented from ilCustomBlock.

Definition at line 22 of file class.ilHtmlBlock.php.

References read(), and ilCustomBlock\setId().

{
if ($a_id > 0)
{
$this->setId($a_id);
$this->read();
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilHtmlBlock::create ( )

Create new item.

Reimplemented from ilCustomBlock.

Definition at line 56 of file class.ilHtmlBlock.php.

References $ilDB, $query, getContent(), and ilCustomBlock\getId().

{
global $ilDB;
$query = "INSERT INTO il_html_block (".
" id".
", content".
" ) VALUES (".
$ilDB->quote($this->getId(), "integer")
.",".$ilDB->quote($this->getContent(), "text").")";
$ilDB->manipulate($query);
}

+ Here is the call graph for this function:

ilHtmlBlock::delete ( )

Delete item from database.

Reimplemented from ilCustomBlock.

Definition at line 114 of file class.ilHtmlBlock.php.

References $ilDB, $query, and ilCustomBlock\getId().

{
global $ilDB;
$query = "DELETE FROM il_html_block".
" WHERE id = ".$ilDB->quote($this->getId(), "integer");
$ilDB->manipulate($query);
}

+ Here is the call graph for this function:

ilHtmlBlock::getContent ( )

Get Content.

Returns
string HTML content of the block.

Definition at line 47 of file class.ilHtmlBlock.php.

References $content.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilHtmlBlock::read ( )

Read item from database.

Reimplemented from ilCustomBlock.

Definition at line 77 of file class.ilHtmlBlock.php.

References $ilDB, $query, ilCustomBlock\getId(), and setContent().

Referenced by __construct().

{
global $ilDB;
$query = "SELECT * FROM il_html_block WHERE id = ".
$ilDB->quote($this->getId(), "integer");
$set = $ilDB->query($query);
$rec = $ilDB->fetchAssoc($set);
$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.

Parameters
string$a_contentHTML content of the block.

Definition at line 37 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 96 of file class.ilHtmlBlock.php.

References $ilDB, $query, getContent(), and ilCustomBlock\getId().

{
global $ilDB;
$query = "UPDATE il_html_block SET ".
" content = ".$ilDB->quote($this->getContent(), "text").
" WHERE id = ".$ilDB->quote($this->getId(), "integer");
$ilDB->manipulate($query);
}

+ Here is the call graph for this function:

Field Documentation

ilHtmlBlock::$content
protected

Definition at line 15 of file class.ilHtmlBlock.php.

Referenced by getContent().


The documentation for this class was generated from the following file: