ILIAS  release_7 Revision v7.30-3-g800a261c036
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...
 
 setProfileBackUrl ($url)
 
 getProfileBackUrl ()
 
 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, $a_abstract_only=false)
 Modify page content after xsl. More...
 
 getModel ()
 Get model. 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
 $profile_back_url
 
 $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

Definition at line 12 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 55 of file class.ilPCConsultationHours.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

56  {
57  $this->node = $this->createPageContentNode();
58  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
59  $this->cach_node = $this->dom->create_element("ConsultationHours");
60  $this->cach_node = $this->node->append_child($this->cach_node);
61  }
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 98 of file class.ilPCConsultationHours.php.

References $res.

99  {
100  $res = array();
101  if (is_object($this->cach_node)) {
102  $children = $this->cach_node->child_nodes();
103  if ($children) {
104  foreach ($children as $child) {
105  $res[] = $child->get_attribute("Id");
106  }
107  }
108  }
109  return $res;
110  }
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 35 of file class.ilPCConsultationHours.php.

36  {
37  return array("ed_insert_consultation_hours", "pc_cach");
38  }

◆ init()

ilPCConsultationHours::init ( )

Init page content component.

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

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

25  {
26  global $DIC;
27  $this->user = $DIC->user();
28  $this->setType("cach");
29  }
setType($a_type)
Set Type.
user()
Definition: user.php:4
global $DIC
Definition: goto.php:24
+ 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 69 of file class.ilPCConsultationHours.php.

References $ilUser, and $user.

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

◆ setNode()

ilPCConsultationHours::setNode (   $a_node)

Set node.

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

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

Field Documentation

◆ $dom

ilPCConsultationHours::$dom

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

◆ $user

ilPCConsultationHours::$user
protected

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

Referenced by setData().


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