ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ 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
}
ilObjUser
User class.
Definition:
class.ilObjUser.php:46
ilPCProfile
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilPCProfile.php:25
ilPCProfile\init
init()
Init object.
Definition:
class.ilPCProfile.php:28
ilPCProfile\setFields
setFields(string $a_mode, ?array $a_fields=null)
Definition:
class.ilPCProfile.php:44
ilPCProfile\getMode
getMode()
Definition:
class.ilPCProfile.php:65
ilPCProfile\$user
ilObjUser $user
Definition:
class.ilPCProfile.php:26
ilPCProfile\getLangVars
static getLangVars()
Get lang vars needed for editing.
Definition:
class.ilPCProfile.php:87
ilPCProfile\getFields
getFields()
Get profile settings.
Definition:
class.ilPCProfile.php:76
ilPCProfile\create
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
Definition:
class.ilPCProfile.php:36
ilPageContent
Content object of ilPageObject (see ILIAS DTD).
Definition:
class.ilPageContent.php:29
ilPageContent\createInitialChildNode
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])
Definition:
class.ilPageContent.php:317
ilPageContent\setType
setType(string $a_type)
Set Type.
Definition:
class.ilPageContent.php:103
ilPageObject
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
Definition:
class.ilPageObject.php:53
$res
$res
Definition:
ltiservices.php:69
ILIAS\Repository\user
user()
Definition:
trait.GlobalDICDomainServices.php:66
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
COPage
PC
Profile
class.ilPCProfile.php
Generated on Sat Oct 18 2025 23:02:51 for ILIAS by
1.9.4 (using
Doxyfile
)