ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilPCConsultationHours Class Reference

Class ilPCConsultationHours. More...

+ Inheritance diagram for ilPCConsultationHours:
+ Collaboration diagram for ilPCConsultationHours:

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 consultation hours node in xml. More...
 
 setData ($a_mode, array $a_grp_ids)
 Set consultation hours settings. More...
 
 getGroupIds ()
 Get consultation hours group ids. 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...
 

Static Public Member Functions

static getLangVars ()
 Get lang vars needed for editing. More...
 
- 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

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

Additional Inherited Members

- 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 ilPCConsultationHours.

Consultation hours 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 16 of file class.ilPCConsultationHours.php.

Member Function Documentation

◆ create()

ilPCConsultationHours::create ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create consultation hours node in xml.

Parameters
object$a_pg_objPage Object
string$a_hier_idHierarchical ID

Definition at line 52 of file class.ilPCConsultationHours.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

53  {
54  $this->node = $this->createPageContentNode();
55  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
56  $this->cach_node = $this->dom->create_element("ConsultationHours");
57  $this->cach_node = $this->node->append_child($this->cach_node);
58  }
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:

◆ getGroupIds()

ilPCConsultationHours::getGroupIds ( )

Get consultation hours group ids.

Returns
string

Definition at line 99 of file class.ilPCConsultationHours.php.

References $res, and array.

100  {
101  $res = array();
102  if (is_object($this->cach_node))
103  {
104  $children = $this->cach_node->child_nodes();
105  if($children)
106  {
107  foreach($children as $child)
108  {
109  $res[] = $child->get_attribute("Id");
110  }
111  }
112  }
113  return $res;
114  }
Create styles array
The data for the language used.

◆ getLangVars()

static ilPCConsultationHours::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

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

References array.

33  {
34  return array("ed_insert_consultation_hours", "pc_cach");
35  }
Create styles array
The data for the language used.

◆ init()

ilPCConsultationHours::init ( )

Init page content component.

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

References ilPageContent\setType().

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

◆ setData()

ilPCConsultationHours::setData (   $a_mode,
array  $a_grp_ids 
)

Set consultation hours settings.

Parameters
int$a_mode
int$a_grp_id

Definition at line 66 of file class.ilPCConsultationHours.php.

References $ilUser.

67  {
68  global $ilUser;
69 
70  $this->cach_node->set_attribute("Mode", $a_mode);
71  $this->cach_node->set_attribute("User", $ilUser->getId());
72 
73  // remove all children first
74  $children = $this->cach_node->child_nodes();
75  if($children)
76  {
77  foreach($children as $child)
78  {
79  $this->cach_node->remove_child($child);
80  }
81  }
82 
83  if($a_mode == "manual")
84  {
85  foreach($a_grp_ids as $grp_id)
86  {
87  $field_node = $this->dom->create_element("ConsultationHoursGroup");
88  $field_node = $this->cach_node->append_child($field_node);
89  $field_node->set_attribute("Id", $grp_id);
90  }
91  }
92  }
$ilUser
Definition: imgupload.php:18

◆ setNode()

ilPCConsultationHours::setNode (   $a_node)

Set node.

Definition at line 40 of file class.ilPCConsultationHours.php.

41  {
42  parent::setNode($a_node); // this is the PageContent node
43  $this->cach_node =& $a_node->first_child(); // this is the consultation hours node
44  }

Field Documentation

◆ $dom

ilPCConsultationHours::$dom

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


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