ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
 

Protected Attributes

 $user
 
- Protected Attributes inherited from ilPageContent
 $file_download_link
 
 $fullscreen_link
 
 $sourcecode_download_script
 
 $log
 

Additional Inherited Members

- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 

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 59 of file class.ilPCConsultationHours.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

60  {
61  $this->node = $this->createPageContentNode();
62  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
63  $this->cach_node = $this->dom->create_element("ConsultationHours");
64  $this->cach_node = $this->node->append_child($this->cach_node);
65  }
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 102 of file class.ilPCConsultationHours.php.

References $res.

103  {
104  $res = array();
105  if (is_object($this->cach_node)) {
106  $children = $this->cach_node->child_nodes();
107  if ($children) {
108  foreach ($children as $child) {
109  $res[] = $child->get_attribute("Id");
110  }
111  }
112  }
113  return $res;
114  }
foreach($_POST as $key=> $value) $res

◆ getLangVars()

static ilPCConsultationHours::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

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

40  {
41  return array("ed_insert_consultation_hours", "pc_cach");
42  }

◆ init()

ilPCConsultationHours::init ( )

Init page content component.

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

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

29  {
30  global $DIC;
31  $this->user = $DIC->user();
32  $this->setType("cach");
33  }
global $DIC
Definition: saml.php:7
setType($a_type)
Set Type.
user()
Definition: user.php:4
+ 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 73 of file class.ilPCConsultationHours.php.

References $ilUser, and $user.

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

◆ setNode()

ilPCConsultationHours::setNode (   $a_node)

Set node.

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

48  {
49  parent::setNode($a_node); // this is the PageContent node
50  $this->cach_node = &$a_node->first_child(); // this is the consultation hours node
51  }

Field Documentation

◆ $dom

ilPCConsultationHours::$dom

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

◆ $user

ilPCConsultationHours::$user
protected

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

Referenced by setData().


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