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

Class ilPCListItem. More...

+ Inheritance diagram for ilPCListItem:
+ Collaboration diagram for ilPCListItem:

Public Member Functions

 init ()
 Init page content component. More...
 
 newItemAfter ()
 insert new list item after current one More...
 
 newItemBefore ()
 insert new list item before current one More...
 
 deleteItem ()
 delete row of cell More...
 
 moveItemDown ()
 move list item down More...
 
 moveItemUp ()
 move list item up 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...
 

Data Fields

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

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...
 
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 
- Protected Attributes inherited from ilPageContent
 $file_download_link
 
 $fullscreen_link
 
 $sourcecode_download_script
 
 $log
 

Detailed Description

Class ilPCListItem.

List Item content object (see ILIAS DTD)

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

Definition at line 17 of file class.ilPCListItem.php.

Member Function Documentation

◆ deleteItem()

ilPCListItem::deleteItem ( )

delete row of cell

Definition at line 59 of file class.ilPCListItem.php.

References ilPageContent\getNode().

60  {
61  $parent_node = $this->getNode()->parent_node();
62  $cnt = count($parent_node->child_nodes());
63  if ($cnt == 1) {
64  // if list item is the last one -> delete whole list
65  $grandma = $parent_node->parent_node();
66  $grandma->unlink($grandma);
67  } else {
68  $li = $this->getNode();
69  $li->unlink($li);
70  }
71  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ init()

ilPCListItem::init ( )

Init page content component.

Definition at line 24 of file class.ilPCListItem.php.

References ilPageContent\setType().

25  {
26  $this->setType("li");
27  }
setType($a_type)
Set Type.
+ Here is the call graph for this function:

◆ moveItemDown()

ilPCListItem::moveItemDown ( )

move list item down

Definition at line 76 of file class.ilPCListItem.php.

References ilPageContent\getNode().

77  {
78  $li = $this->getNode();
79  $next = $li->next_sibling();
80  $next_copy = $next->clone_node(true);
81  $next_copy = $li->insert_before($next_copy, $li);
82  $next->unlink($next);
83  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ moveItemUp()

ilPCListItem::moveItemUp ( )

move list item up

Definition at line 88 of file class.ilPCListItem.php.

References ilPageContent\getNode().

89  {
90  $li = $this->getNode();
91  $prev = $li->previous_sibling();
92  $li_copy = $li->clone_node(true);
93  $li_copy = $prev->insert_before($li_copy, $prev);
94  $li->unlink($li);
95  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ newItemAfter()

ilPCListItem::newItemAfter ( )

insert new list item after current one

Definition at line 32 of file class.ilPCListItem.php.

References ilPageContent\getNode().

33  {
34  $li = $this->getNode();
35  $new_li = $this->dom->create_element("ListItem");
36  if ($next_li = $li->next_sibling()) {
37  $new_li = $next_li->insert_before($new_li, $next_li);
38  } else {
39  $parent_list = $li->parent_node();
40  $new_li = $parent_list->append_child($new_li);
41  }
42  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ newItemBefore()

ilPCListItem::newItemBefore ( )

insert new list item before current one

Definition at line 48 of file class.ilPCListItem.php.

References ilPageContent\getNode().

49  {
50  $li = $this->getNode();
51  $new_li = $this->dom->create_element("ListItem");
52  $new_li = $li->insert_before($new_li, $li);
53  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

Field Documentation

◆ $dom

ilPCListItem::$dom

Definition at line 19 of file class.ilPCListItem.php.


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