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

Class ilPCProfile. More...

+ Inheritance diagram for ilPCProfile:
+ Collaboration diagram for ilPCProfile:

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 profile node in xml. More...
 
 setFields ($a_mode, array $a_fields=null)
 Set profile settings. More...
 
 getMode ()
 Get profile mode. More...
 
 getFields ()
 Get profile settings. 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 ilPCProfile.

Personal data 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 18 of file class.ilPCProfile.php.

Member Function Documentation

◆ create()

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

Create profile node in xml.

Parameters
object$a_pg_objPage Object
string$a_hier_idHierarchical ID

Definition at line 45 of file class.ilPCProfile.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

46  {
47  $this->node = $this->createPageContentNode();
48  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
49  $this->prof_node = $this->dom->create_element("Profile");
50  $this->prof_node = $this->node->append_child($this->prof_node);
51  }
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:

◆ getFields()

ilPCProfile::getFields ( )

Get profile settings.

Returns
array

Definition at line 105 of file class.ilPCProfile.php.

References $res, and array.

106  {
107  $res = array();
108  if (is_object($this->prof_node))
109  {
110  $children = $this->prof_node->child_nodes();
111  if($children)
112  {
113  foreach($children as $child)
114  {
115  $res[] = $child->get_attribute("Name");
116  }
117  }
118  }
119  return $res;
120  }
Create styles array
The data for the language used.

◆ getLangVars()

static ilPCProfile::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

Definition at line 126 of file class.ilPCProfile.php.

References array.

127  {
128  return array("pc_prof", "ed_insert_profile");
129  }
Create styles array
The data for the language used.

◆ getMode()

ilPCProfile::getMode ( )

Get profile mode.

Returns
string

Definition at line 92 of file class.ilPCProfile.php.

93  {
94  if (is_object($this->prof_node))
95  {
96  return $this->prof_node->get_attribute("Mode");
97  }
98  }

◆ init()

ilPCProfile::init ( )

Init page content component.

Definition at line 25 of file class.ilPCProfile.php.

References ilPageContent\setType().

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

◆ setFields()

ilPCProfile::setFields (   $a_mode,
array  $a_fields = null 
)

Set profile settings.

Parameters
string$a_mode
array$a_fields

Definition at line 59 of file class.ilPCProfile.php.

References $ilUser.

60  {
61  global $ilUser;
62 
63  $this->prof_node->set_attribute("Mode", $a_mode);
64  $this->prof_node->set_attribute("User", $ilUser->getId());
65 
66  // remove all children first
67  $children = $this->prof_node->child_nodes();
68  if($children)
69  {
70  foreach($children as $child)
71  {
72  $this->prof_node->remove_child($child);
73  }
74  }
75 
76  if($a_mode == "manual")
77  {
78  foreach($a_fields as $field)
79  {
80  $field_node = $this->dom->create_element("ProfileField");
81  $field_node = $this->prof_node->append_child($field_node);
82  $field_node->set_attribute("Name", $field);
83  }
84  }
85  }
$ilUser
Definition: imgupload.php:18

◆ setNode()

ilPCProfile::setNode (   $a_node)

Set node.

Definition at line 33 of file class.ilPCProfile.php.

34  {
35  parent::setNode($a_node); // this is the PageContent node
36  $this->prof_node = $a_node->first_child(); // this is the profile node
37  }

Field Documentation

◆ $dom

ilPCProfile::$dom

Definition at line 20 of file class.ilPCProfile.php.


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