6 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
34 $this->
user = $DIC->user();
43 parent::setNode($a_node);
44 $this->prof_node = $a_node->first_child();
53 public function create(&$a_pg_obj, $a_hier_id, $a_pc_id =
"")
57 $this->prof_node = $this->dom->create_element(
"Profile");
58 $this->prof_node = $this->node->append_child($this->prof_node);
67 public function setFields($a_mode, array $a_fields = null)
71 $this->prof_node->set_attribute(
"Mode", $a_mode);
72 $this->prof_node->set_attribute(
"User",
$ilUser->getId());
75 $children = $this->prof_node->child_nodes();
77 foreach ($children as $child) {
78 $this->prof_node->remove_child($child);
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);
98 if (is_object($this->prof_node)) {
99 return $this->prof_node->get_attribute(
"Mode");
111 if (is_object($this->prof_node)) {
112 $children = $this->prof_node->child_nodes();
114 foreach ($children as $child) {
115 $res[] = $child->get_attribute(
"Name");
128 return array(
"pc_prof",
"ed_insert_profile");
init()
Init page content component.
static getLangVars()
Get lang vars needed for editing.
setNode($a_node)
Set node.
setType($a_type)
Set Type.
setFields($a_mode, array $a_fields=null)
Set profile settings.
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
Create profile node in xml.
foreach($_POST as $key=> $value) $res
getFields()
Get profile settings.
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
getMode()
Get profile mode.