29 public function init(): void
33 $this->
user = $DIC->user();
39 parent::setNode($a_node);
50 $this->prof_node = $this->dom->create_element(
"Profile");
51 $this->prof_node = $this->node->append_child($this->prof_node);
56 array $a_fields =
null
60 $this->prof_node->set_attribute(
"Mode", $a_mode);
61 $this->prof_node->set_attribute(
"User",
$ilUser->getId());
64 $children = $this->prof_node->child_nodes();
66 foreach ($children as $child) {
67 $this->prof_node->remove_child($child);
71 if ($a_mode ==
"manual") {
72 foreach ($a_fields as $field) {
73 $field_node = $this->dom->create_element(
"ProfileField");
74 $field_node = $this->prof_node->append_child($field_node);
75 $field_node->set_attribute(
"Name", $field);
82 if (is_object($this->prof_node)) {
83 return $this->prof_node->get_attribute(
"Mode");
94 if (is_object($this->prof_node)) {
95 $children = $this->prof_node->child_nodes();
97 foreach ($children as $child) {
98 $res[] = $child->get_attribute(
"Name");
107 return array(
"pc_prof",
"ed_insert_profile");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLangVars()
Get lang vars needed for editing.
setNode(php4DOMElement $a_node)
Set xml node of page content.
getFields()
Get profile settings.
setFields(string $a_mode, array $a_fields=null)
php4DOMElement $prof_node
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
createPageContentNode(bool $a_set_this_node=true)
Create page content node (always use this method first when adding a new element)
setType(string $a_type)
Set Type.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
insertContent(ilPageContent $a_cont_obj, string $a_pos, int $a_mode=IL_INSERT_AFTER, string $a_pcid="", bool $remove_placeholder=true)
insert a content node before/after a sibling or as first child of a parent