ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
 

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 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 53 of file class.ilPCProfile.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

54  {
55  $this->node = $this->createPageContentNode();
56  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
57  $this->prof_node = $this->dom->create_element("Profile");
58  $this->prof_node = $this->node->append_child($this->prof_node);
59  }
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 108 of file class.ilPCProfile.php.

References $res, and array.

109  {
110  $res = array();
111  if (is_object($this->prof_node)) {
112  $children = $this->prof_node->child_nodes();
113  if ($children) {
114  foreach ($children as $child) {
115  $res[] = $child->get_attribute("Name");
116  }
117  }
118  }
119  return $res;
120  }
foreach($_POST as $key=> $value) $res
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 96 of file class.ilPCProfile.php.

97  {
98  if (is_object($this->prof_node)) {
99  return $this->prof_node->get_attribute("Mode");
100  }
101  }

◆ init()

ilPCProfile::init ( )

Init page content component.

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

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

31  {
32  global $DIC;
33 
34  $this->user = $DIC->user();
35  $this->setType("prof");
36  }
global $DIC
Definition: saml.php:7
setType($a_type)
Set Type.
user()
Definition: user.php:4
+ 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 67 of file class.ilPCProfile.php.

References $ilUser, and $user.

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

◆ setNode()

ilPCProfile::setNode (   $a_node)

Set node.

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

42  {
43  parent::setNode($a_node); // this is the PageContent node
44  $this->prof_node = $a_node->first_child(); // this is the profile node
45  }

Field Documentation

◆ $dom

ilPCProfile::$dom

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

◆ $user

ilPCProfile::$user
protected

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

Referenced by setFields().


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