4 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
31 $this->
user = $DIC->user();
41 return array(
"ed_insert_consultation_hours",
"pc_cach");
49 parent::setNode($a_node);
50 $this->cach_node = &$a_node->first_child();
59 public function create(&$a_pg_obj, $a_hier_id, $a_pc_id =
"")
63 $this->cach_node = $this->dom->create_element(
"ConsultationHours");
64 $this->cach_node = $this->node->append_child($this->cach_node);
73 public function setData($a_mode, array $a_grp_ids)
77 $this->cach_node->set_attribute(
"Mode", $a_mode);
78 $this->cach_node->set_attribute(
"User",
$ilUser->getId());
81 $children = $this->cach_node->child_nodes();
83 foreach ($children as $child) {
84 $this->cach_node->remove_child($child);
88 if ($a_mode ==
"manual") {
89 foreach ($a_grp_ids as $grp_id) {
90 $field_node = $this->dom->create_element(
"ConsultationHoursGroup");
91 $field_node = $this->cach_node->append_child($field_node);
92 $field_node->set_attribute(
"Id", $grp_id);
105 if (is_object($this->cach_node)) {
106 $children = $this->cach_node->child_nodes();
108 foreach ($children as $child) {
109 $res[] = $child->get_attribute(
"Id");
getGroupIds()
Get consultation hours group ids.
setData($a_mode, array $a_grp_ids)
Set consultation hours settings.
Class ilPCConsultationHours.
setType($a_type)
Set Type.
setNode($a_node)
Set node.
foreach($_POST as $key=> $value) $res
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
static getLangVars()
Get lang vars needed for editing.
init()
Init page content component.
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
Create consultation hours node in xml.