ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCBlog Class Reference

Class ilPCBlog. More...

+ Inheritance diagram for ilPCBlog:
+ Collaboration diagram for ilPCBlog:

Public Member Functions

 init ()
 Init page content component.
 setNode (&$a_node)
 Set node.
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create blog node in xml.
 setData ($a_blog_id, array $a_posting_ids=null)
 Set blog settings.
 getBlogId ()
 Get blog mode.
 getPostings ()
 Get blog postings.
- Public Member Functions inherited from ilPageContent
 __construct ($a_dom)
 Constructor.
 getType ()
 Get type of page content.
getNode ()
 Get xml node of page content.
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure.
 getHierId ()
 Get hierarchical id.
 lookupHierId ()
 Get hierarchical id from dom.
 readHierId ()
 Read PC Id.
 setPcId ($a_pcid)
 Set PC Id.
 getPCId ()
 Get PC Id.
 readPCId ()
 Read PC Id.
 writePCId ($a_pc_id)
 Write pc id.
 isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b.
 setEnabled ($value)
 Set Enabled value for page content component.
 enable ()
 Enable page content.
 disable ()
 Disable page content.
 isEnabled ()
 Check whether page content is enabled.
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element)

Data Fields

 $dom
- Data Fields inherited from ilPageContent
 $hier_id
 $node
 $dom

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number)
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number)
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container.
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order.
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type.

Detailed Description

Class ilPCBlog.

Blog content object (see ILIAS DTD)

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilPCListItem.php 22210 2009-10-26 09:46:06Z akill

Definition at line 36 of file class.ilPCBlog.php.

Member Function Documentation

ilPCBlog::create ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create blog node in xml.

Parameters
object$a_pg_objPage Object
string$a_hier_idHierarchical ID

Definition at line 63 of file class.ilPCBlog.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

{
$this->node = $this->createPageContentNode();
$a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
$this->blog_node = $this->dom->create_element("Blog");
$this->blog_node = $this->node->append_child($this->blog_node);
}

+ Here is the call graph for this function:

ilPCBlog::getBlogId ( )

Get blog mode.

Returns
string

Definition at line 110 of file class.ilPCBlog.php.

{
if (is_object($this->blog_node))
{
return $this->blog_node->get_attribute("Id");
}
}
ilPCBlog::getPostings ( )

Get blog postings.

Returns
array

Definition at line 123 of file class.ilPCBlog.php.

References $res.

{
$res = array();
if (is_object($this->blog_node))
{
$children = $this->blog_node->child_nodes();
if($children)
{
foreach($children as $child)
{
$res[] = $child->get_attribute("Id");
}
}
}
return $res;
}
ilPCBlog::init ( )

Init page content component.

Reimplemented from ilPageContent.

Definition at line 43 of file class.ilPCBlog.php.

References ilPageContent\setType().

{
$this->setType("blog");
}

+ Here is the call graph for this function:

ilPCBlog::setData (   $a_blog_id,
array  $a_posting_ids = null 
)

Set blog settings.

Parameters
int$a_blog_id
array$a_posting_ids

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

References $ilUser.

{
global $ilUser;
$this->blog_node->set_attribute("Id", $a_blog_id);
$this->blog_node->set_attribute("User", $ilUser->getId());
// remove all children first
$children = $this->blog_node->child_nodes();
if($children)
{
foreach($children as $child)
{
$this->blog_node->remove_child($child);
}
}
if(sizeof($a_posting_ids))
{
foreach($a_posting_ids as $posting_id)
{
$post_node = $this->dom->create_element("BlogPosting");
$post_node = $this->blog_node->append_child($post_node);
$post_node->set_attribute("Id", $posting_id);
}
}
}
ilPCBlog::setNode ( $a_node)

Set node.

Reimplemented from ilPageContent.

Definition at line 51 of file class.ilPCBlog.php.

{
parent::setNode($a_node); // this is the PageContent node
$this->blog_node =& $a_node->first_child(); // this is the blog node
}

Field Documentation

ilPCBlog::$dom

Definition at line 38 of file class.ilPCBlog.php.


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