ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPCFileItem Class Reference

Class ilPCFileItem. More...

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

Public Member Functions

 init ()
 Init page content component.
 newItemAfter ($a_id, $a_location, $a_format)
 insert new list item after current one
 newItemBefore ($a_id, $a_location, $a_format)
 insert new list item before current one
 deleteItem ()
 Delete file item.
 moveItemDown ()
 move list item down
 moveItemUp ()
 move list item up
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor.
 setPage ($a_val)
 Set page.
 getPage ()
 Get page.
 getType ()
 Get type of page content.
 setNode (&$a_node)
 Set xml node of page content.
getNode ()
 Get xml node of page content.
 getJavascriptFiles ()
 Get Javascript files.
 getCssFiles ()
 Get css files.
 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)
 modifyPageContentPostXsl ($a_output, $a_mode)
 Modify page content after xsl.

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.
static getLangVars ()
 Get lang vars needed for editing.
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content.
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created)
static beforePageDelete ($a_page)
 Before page is being deleted.
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created.
- Data Fields inherited from ilPageContent
 $hier_id
 $node
 $dom
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type.

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:
class.ilPCFileItem.php 43464 2013-07-17 09:18:27Z akill

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

Member Function Documentation

ilPCFileItem::deleteItem ( )

Delete file item.

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

References ilPageContent\getNode().

{
$li =& $this->getNode();
$li->unlink($li);
}

+ Here is the call graph for this function:

ilPCFileItem::init ( )

Init page content component.

Reimplemented from ilPageContent.

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

References ilPageContent\setType().

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

+ Here is the call graph for this function:

ilPCFileItem::moveItemDown ( )

move list item down

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

References ilPageContent\getNode().

{
$li =& $this->getNode();
$next =& $li->next_sibling();
$next_copy = $next->clone_node(true);
$next_copy =& $li->insert_before($next_copy, $li);
$next->unlink($next);
}

+ Here is the call graph for this function:

ilPCFileItem::moveItemUp ( )

move list item up

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

References ilPageContent\getNode().

{
$li =& $this->getNode();
$prev =& $li->previous_sibling();
$li_copy = $li->clone_node(true);
$li_copy =& $prev->insert_before($li_copy, $prev);
$li->unlink($li);
}

+ Here is the call graph for this function:

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().

{
$li =& $this->getNode();
$new_item =& $this->dom->create_element("FileItem");
if ($next_li =& $li->next_sibling())
{
$new_item =& $next_li->insert_before($new_item, $next_li);
}
else
{
$parent_list =& $li->parent_node();
$new_item =& $parent_list->append_child($new_item);
}
// Identifier
$id_node =& $this->dom->create_element("Identifier");
$id_node =& $new_item->append_child($id_node);
$id_node->set_attribute("Catalog", "ILIAS");
$id_node->set_attribute("Entry", "il__file_".$a_id);
// Location
$loc_node =& $this->dom->create_element("Location");
$loc_node =& $new_item->append_child($loc_node);
$loc_node->set_attribute("Type", "LocalFile");
$loc_node->set_content($a_location);
// Format
$form_node =& $this->dom->create_element("Format");
$form_node =& $new_item->append_child($form_node);
$form_node->set_content($a_format);
}

+ Here is the call graph for this function:

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().

{
$li =& $this->getNode();
$new_item =& $this->dom->create_element("FileItem");
$new_item =& $li->insert_before($new_item, $li);
// Identifier
$id_node =& $this->dom->create_element("Identifier");
$id_node =& $new_item->append_child($id_node);
$id_node->set_attribute("Catalog", "ILIAS");
$id_node->set_attribute("Entry", "il__file_".$a_id);
// Location
$loc_node =& $this->dom->create_element("Location");
$loc_node =& $new_item->append_child($loc_node);
$loc_node->set_attribute("Type", "LocalFile");
$loc_node->set_content($a_location);
// Format
$form_node =& $this->dom->create_element("Format");
$form_node =& $new_item->append_child($form_node);
$form_node->set_content($a_format);
}

+ Here is the call graph for this function:


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