ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPCBlog Class Reference

Class ilPCBlog. More...

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

Public Member Functions

 init ()
 Init page content component. More...
 
 setNode ($a_node)
 Set node. More...
 
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create blog node in xml. More...
 
 setData ($a_blog_id, array $a_posting_ids=null)
 Set blog settings. More...
 
 getBlogId ()
 Get blog mode. More...
 
 getPostings ()
 Get blog postings. More...
 
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 init ()
 Init object. More...
 
 getType ()
 Get type of page content. More...
 
 setNode ($a_node)
 Set xml node of page content. More...
 
getNode ()
 Get xml node of page content. More...
 
 getJavascriptFiles ($a_mode)
 Get Javascript files. More...
 
 getCssFiles ($a_mode)
 Get css files. More...
 
 getOnloadCode ($a_mode)
 Get on load code. More...
 
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure. More...
 
 getHierId ()
 Get hierarchical id. More...
 
 lookupHierId ()
 Get hierarchical id from dom. More...
 
 readHierId ()
 Read PC Id. More...
 
 setPcId ($a_pcid)
 Set PC Id. More...
 
 getPCId ()
 Get PC Id. More...
 
 setFileDownloadLink ($a_download_link)
 Set file download link. More...
 
 getFileDownloadLink ()
 Get file download link. More...
 
 setFullscreenLink ($a_fullscreen_link)
 Set fullscreen link. More...
 
 getFullscreenLink ()
 Get fullscreen link. More...
 
 setSourcecodeDownloadScript ($script_name)
 Set sourcecode download script. More...
 
 getSourcecodeDownloadScript ()
 Get sourcecode download script. More...
 
 readPCId ()
 Read PC Id. More...
 
 writePCId ($a_pc_id)
 Write pc id. More...
 
 setEnabled ($value)
 Set Enabled value for page content component. More...
 
 enable ()
 Enable page content. More...
 
 disable ()
 Disable page content. More...
 
 isEnabled ()
 Check whether page content is enabled. More...
 
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 modifyPageContentPostXsl ($a_output, $a_mode)
 Modify page content after xsl. More...
 

Protected Attributes

 $user
 
- Protected Attributes inherited from ilPageContent
 $file_download_link
 
 $fullscreen_link
 
 $sourcecode_download_script
 
 $log
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number) More...
 
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number) More...
 
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container. More...
 
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content. More...
 
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete ($a_page)
 Before page is being deleted. More...
 
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created. More...
 
- Data Fields inherited from ilPageContent
 $hier_id
 
 $node
 
 $dom
 
 $page_lang
 
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 

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

◆ create()

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 69 of file class.ilPCBlog.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

70  {
71  $this->node = $this->createPageContentNode();
72  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
73  $this->blog_node = $this->dom->create_element("Blog");
74  $this->blog_node = $this->node->append_child($this->blog_node);
75  }
const IL_INSERT_AFTER
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
+ Here is the call graph for this function:

◆ getBlogId()

ilPCBlog::getBlogId ( )

Get blog mode.

Returns
string

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

113  {
114  if (is_object($this->blog_node)) {
115  return $this->blog_node->get_attribute("Id");
116  }
117  }

◆ getPostings()

ilPCBlog::getPostings ( )

Get blog postings.

Returns
array

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

References $res, and array.

125  {
126  $res = array();
127  if (is_object($this->blog_node)) {
128  $children = $this->blog_node->child_nodes();
129  if ($children) {
130  foreach ($children as $child) {
131  $res[] = $child->get_attribute("Id");
132  }
133  }
134  }
135  return $res;
136  }
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.

◆ init()

ilPCBlog::init ( )

Init page content component.

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

References $DIC, ilPageContent\setType(), and user().

47  {
48  global $DIC;
49 
50  $this->user = $DIC->user();
51  $this->setType("blog");
52  }
global $DIC
Definition: saml.php:7
setType($a_type)
Set Type.
user()
Definition: user.php:4
+ Here is the call graph for this function:

◆ setData()

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 83 of file class.ilPCBlog.php.

References $ilUser, and $user.

84  {
86 
87  $this->blog_node->set_attribute("Id", $a_blog_id);
88  $this->blog_node->set_attribute("User", $ilUser->getId());
89 
90  // remove all children first
91  $children = $this->blog_node->child_nodes();
92  if ($children) {
93  foreach ($children as $child) {
94  $this->blog_node->remove_child($child);
95  }
96  }
97 
98  if (sizeof($a_posting_ids)) {
99  foreach ($a_posting_ids as $posting_id) {
100  $post_node = $this->dom->create_element("BlogPosting");
101  $post_node = $this->blog_node->append_child($post_node);
102  $post_node->set_attribute("Id", $posting_id);
103  }
104  }
105  }
$ilUser
Definition: imgupload.php:18

◆ setNode()

ilPCBlog::setNode (   $a_node)

Set node.

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

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

Field Documentation

◆ $user

ilPCBlog::$user
protected

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

Referenced by setData().


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