ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilPCProfile.php
Go to the documentation of this file.
1
<?php
2
24
class
ilPCProfile
extends
ilPageContent
25
{
26
protected
ilObjUser
$user
;
27
28
public
function
init
(): void
29
{
30
global
$DIC
;
31
32
$this->
user
= $DIC->user();
33
$this->
setType
(
"prof"
);
34
}
35
36
public
function
create
(
37
ilPageObject
$a_pg_obj,
38
string
$a_hier_id,
39
string
$a_pc_id =
""
40
): void {
41
$this->
createInitialChildNode
($a_hier_id, $a_pc_id,
"Profile"
);
42
}
43
44
public
function
setFields
(
45
string
$a_mode,
46
?array $a_fields =
null
47
): void {
48
$ilUser =
$this->user
;
49
50
$this->
getChildNode
()->setAttribute(
"Mode"
, $a_mode);
51
$this->
getChildNode
()->setAttribute(
"User"
, $ilUser->getId());
52
53
// remove all children first
54
$this->dom_util->deleteAllChilds($this->
getChildNode
());
55
56
if
($a_mode ==
"manual"
) {
57
foreach
($a_fields as $field) {
58
$field_node = $this->dom_doc->createElement(
"ProfileField"
);
59
$field_node = $this->
getChildNode
()->appendChild($field_node);
60
$field_node->setAttribute(
"Name"
, $field);
61
}
62
}
63
}
64
65
public
function
getMode
(): string
66
{
67
if
(is_object($this->
getChildNode
())) {
68
return
$this->
getChildNode
()->getAttribute(
"Mode"
);
69
}
70
return
""
;
71
}
72
76
public
function
getFields
(): array
77
{
78
$res
= array();
79
if
(is_object($this->
getChildNode
())) {
80
foreach
($this->
getChildNode
()->childNodes as $child) {
81
$res
[] = $child->getAttribute(
"Name"
);
82
}
83
}
84
return
$res
;
85
}
86
87
public
static
function
getLangVars
(): array
88
{
89
return
array(
"pc_prof"
,
"ed_insert_profile"
);
90
}
91
}
ilPCProfile\init
init()
Definition:
class.ilPCProfile.php:28
ilPageContent\setType
setType(string $a_type)
Set Type.
Definition:
class.ilPageContent.php:103
$res
$res
Definition:
ltiservices.php:66
ilPCProfile\getLangVars
static getLangVars()
Definition:
class.ilPCProfile.php:87
ilPageContent\getChildNode
getChildNode()
Definition:
class.ilPageContent.php:128
ilPageContent
Content object of ilPageObject (see ILIAS DTD).
Definition:
class.ilPageContent.php:28
ILIAS\Repository\user
user()
Definition:
trait.GlobalDICDomainServices.php:66
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ilObjUser
ilPCProfile\$user
ilObjUser $user
Definition:
class.ilPCProfile.php:26
ilPageObject
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
Definition:
class.ilPageObject.php:52
$DIC
global $DIC
Definition:
shib_login.php:26
ilPCProfile
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilPCProfile.php:24
ilPCProfile\create
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
Definition:
class.ilPCProfile.php:36
ilPCProfile\getFields
getFields()
Get profile settings.
Definition:
class.ilPCProfile.php:76
ilPCProfile\getMode
getMode()
Definition:
class.ilPCProfile.php:65
ilPCProfile\setFields
setFields(string $a_mode, ?array $a_fields=null)
Definition:
class.ilPCProfile.php:44
ilPageContent\createInitialChildNode
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])
Definition:
class.ilPageContent.php:317
components
ILIAS
COPage
PC
Profile
class.ilPCProfile.php
Generated on Sun Aug 31 2025 23:02:41 for ILIAS by
1.8.13 (using
Doxyfile
)