ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPCBlog Class Reference

Class ilPCBlog Blog content object (see ILIAS DTD) More...

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

Public Member Functions

 init ()
 
 create (ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
 
 setData (int $a_blog_id, ?array $a_posting_ids=null)
 Set blog settings. More...
 
 getBlogId ()
 
 getPostings ()
 Get blog postings. More...
 
- Public Member Functions inherited from ilPageContent
 __construct (ilPageObject $a_pg_obj, ?PageManagerInterface $page_manager=null, ?ObjectAdapterInterface $object_adapter=null)
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 init ()
 Init object. More...
 
 getType ()
 
 getDomNode ()
 
 getDomDoc ()
 
 setDomNode (DOMNode $node)
 
 getChildNode ()
 
 getJavascriptFiles (string $a_mode)
 
 getCssFiles (string $a_mode)
 
 getOnloadCode (string $a_mode)
 
 setHierId (string $a_hier_id)
 
 getHierId ()
 
 lookupHierId ()
 
 readHierId ()
 
 setPcId (string $a_pcid)
 
 getPCId ()
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setProfileBackUrl (string $url)
 
 getProfileBackUrl ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 readPCId ()
 
 writePCId (string $a_pc_id)
 
 setEnabled (string $value)
 Set Enabled value for page content component. More...
 
 enable ()
 
 disable ()
 
 isEnabled ()
 
 createPageContentNode (bool $a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 getNewPageContentNode ()
 
 modifyPageContentPostXsl (string $a_output, string $a_mode, bool $a_abstract_only=false)
 Modify page content after xsl. More...
 
 getModel ()
 Get model as needed for the front-end editor. More...
 

Protected Attributes

ilObjUser $user
 
- Protected Attributes inherited from ilPageContent
DOMDocument $dom_doc
 
ILIAS COPage InternalDomainService $domain
 
string $pcid
 
string $type = ""
 
ilPageObject $pg_obj
 
string $file_download_link
 
string $fullscreen_link
 
string $sourcecode_download_script
 
ilLogger $log
 
string $profile_back_url = ""
 
ILIAS COPage Dom DomUtil $dom_util
 
PageManagerInterface $page_manager = null
 
ObjectAdapterInterface $object = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
static sortHierIds (array $a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static isGreaterHierId (string $a, string $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, bool $a_self_ass=true, bool $a_clone_mobs=false, int $new_parent_id=0, int $obj_copy_id=0)
 Handle copied content. More...
 
static afterPageUpdate (ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete (ilPageObject $a_page)
 Before page is being deleted. More...
 
static afterRepositoryCopy (ilPageObject $page, array $mapping, int $source_ref_id)
 After repository (container) copy action. More...
 
static afterPageHistoryEntry (ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr)
 After page history entry has been created. More...
 
static deleteHistoryLowerEqualThan (string $parent_type, int $page_id, string $lang, int $delete_lower_than_nr)
 Overwrite in derived classes, if old history entries are being deleted. More...
 
- Data Fields inherited from ilPageContent
string $hier_id = ""
 
DOMNode $dom_node = null
 
string $page_lang = ""
 
- Protected Member Functions inherited from ilPageContent
 getPageManager ()
 
 setType (string $a_type)
 Set Type. More...
 
 hasNode ()
 
 createInitialChildNode (string $hier_id, string $pc_id, string $child, array $child_attributes=[])
 

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

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

Member Function Documentation

◆ create()

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

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

References ilPageContent\createInitialChildNode().

43  : void {
44  $this->createInitialChildNode($a_hier_id, $a_pc_id, "Blog");
45  }
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])
+ Here is the call graph for this function:

◆ getBlogId()

ilPCBlog::getBlogId ( )

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

References ilPageContent\getChildNode().

74  : int
75  {
76  if (is_object($this->getChildNode())) {
77  return (int) $this->getChildNode()->getAttribute("Id");
78  }
79  return 0;
80  }
+ Here is the call graph for this function:

◆ getPostings()

ilPCBlog::getPostings ( )

Get blog postings.

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

References $res, ilPageContent\getChildNode(), and ILIAS\Repository\int().

85  : array
86  {
87  $res = array();
88  if (is_object($this->getChildNode())) {
89  $children = $this->getChildNode()->childNodes;
90  if ($children) {
91  foreach ($children as $child) {
92  $res[] = (int) $child->getAttribute("Id");
93  }
94  }
95  }
96  return $res;
97  }
$res
Definition: ltiservices.php:66
+ Here is the call graph for this function:

◆ init()

ilPCBlog::init ( )

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

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

31  : void
32  {
33  global $DIC;
34 
35  $this->user = $DIC->user();
36  $this->setType("blog");
37  }
setType(string $a_type)
Set Type.
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ setData()

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

Set blog settings.

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

References $user, and ilPageContent\getChildNode().

53  : void {
54  $ilUser = $this->user;
55 
56  $this->getChildNode()->setAttribute("Id", (string) $a_blog_id);
57  $this->getChildNode()->setAttribute("User", (string) $ilUser->getId());
58 
59  // remove all children first
60  $children = $this->getChildNode()->childNodes;
61  if ($children) {
62  $this->dom_util->deleteAllChilds($this->getChildNode());
63  }
64 
65  if (count($a_posting_ids)) {
66  foreach ($a_posting_ids as $posting_id) {
67  $post_node = $this->dom_doc->createElement("BlogPosting");
68  $post_node = $this->getChildNode()->appendChild($post_node);
69  $post_node->setAttribute("Id", (string) $posting_id);
70  }
71  }
72  }
ilObjUser $user
+ Here is the call graph for this function:

Field Documentation

◆ $user

ilObjUser ilPCBlog::$user
protected

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

Referenced by setData().


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