ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPCFileItem Class Reference

Class ilPCFileItem. More...

+ Inheritance diagram for ilPCFileItem:
+ Collaboration diagram for ilPCFileItem:

Public Member Functions

 init ()
 Init page content component. More...
 
 newItemAfter ($a_id, $a_location, $a_format)
 insert new list item after current one More...
 
 newItemBefore ($a_id, $a_location, $a_format)
 insert new list item before current one More...
 
 deleteItem ()
 Delete file item. 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 ()
 Get Javascript files. More...
 
 getCssFiles ()
 Get css files. More...
 
 getOnloadCode ()
 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...
 
 readPCId ()
 Read PC Id. More...
 
 writePCId ($a_pc_id)
 Write pc id. More...
 
 isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b. 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...
 

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

Detailed Description

Class ilPCFileItem.

File 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 18 of file class.ilPCFileItem.php.

Member Function Documentation

◆ deleteItem()

ilPCFileItem::deleteItem ( )

Delete file item.

Definition at line 94 of file class.ilPCFileItem.php.

References ilPageContent\getNode().

95  {
96  $li =& $this->getNode();
97  $li->unlink($li);
98  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ init()

ilPCFileItem::init ( )

Init page content component.

Definition at line 23 of file class.ilPCFileItem.php.

References ilPageContent\setType().

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

◆ moveItemDown()

ilPCFileItem::moveItemDown ( )

move list item down

Definition at line 103 of file class.ilPCFileItem.php.

References ilPageContent\getNode().

104  {
105  $li =& $this->getNode();
106  $next =& $li->next_sibling();
107  $next_copy = $next->clone_node(true);
108  $next_copy =& $li->insert_before($next_copy, $li);
109  $next->unlink($next);
110  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ moveItemUp()

ilPCFileItem::moveItemUp ( )

move list item up

Definition at line 115 of file class.ilPCFileItem.php.

References ilPageContent\getNode().

116  {
117  $li =& $this->getNode();
118  $prev =& $li->previous_sibling();
119  $li_copy = $li->clone_node(true);
120  $li_copy =& $prev->insert_before($li_copy, $prev);
121  $li->unlink($li);
122  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ newItemAfter()

ilPCFileItem::newItemAfter (   $a_id,
  $a_location,
  $a_format 
)

insert new list item after current one

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

References ilPageContent\getNode().

32  {
33  $li =& $this->getNode();
34  $new_item =& $this->dom->create_element("FileItem");
35  if ($next_li =& $li->next_sibling())
36  {
37  $new_item =& $next_li->insert_before($new_item, $next_li);
38  }
39  else
40  {
41  $parent_list =& $li->parent_node();
42  $new_item =& $parent_list->append_child($new_item);
43  }
44 
45  // Identifier
46  $id_node =& $this->dom->create_element("Identifier");
47  $id_node =& $new_item->append_child($id_node);
48  $id_node->set_attribute("Catalog", "ILIAS");
49  $id_node->set_attribute("Entry", "il__file_".$a_id);
50 
51  // Location
52  $loc_node =& $this->dom->create_element("Location");
53  $loc_node =& $new_item->append_child($loc_node);
54  $loc_node->set_attribute("Type", "LocalFile");
55  $loc_node->set_content($a_location);
56 
57  // Format
58  $form_node =& $this->dom->create_element("Format");
59  $form_node =& $new_item->append_child($form_node);
60  $form_node->set_content($a_format);
61  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

◆ newItemBefore()

ilPCFileItem::newItemBefore (   $a_id,
  $a_location,
  $a_format 
)

insert new list item before current one

Definition at line 67 of file class.ilPCFileItem.php.

References ilPageContent\getNode().

68  {
69  $li =& $this->getNode();
70  $new_item =& $this->dom->create_element("FileItem");
71  $new_item =& $li->insert_before($new_item, $li);
72 
73  // Identifier
74  $id_node =& $this->dom->create_element("Identifier");
75  $id_node =& $new_item->append_child($id_node);
76  $id_node->set_attribute("Catalog", "ILIAS");
77  $id_node->set_attribute("Entry", "il__file_".$a_id);
78 
79  // Location
80  $loc_node =& $this->dom->create_element("Location");
81  $loc_node =& $new_item->append_child($loc_node);
82  $loc_node->set_attribute("Type", "LocalFile");
83  $loc_node->set_content($a_location);
84 
85  // Format
86  $form_node =& $this->dom->create_element("Format");
87  $form_node =& $new_item->append_child($form_node);
88  $form_node->set_content($a_format);
89  }
& getNode()
Get xml node of page content.
+ Here is the call graph for this function:

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