6 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
35 parent::setNode($a_node);
36 $this->skill_node =& $a_node->first_child();
45 function create(&$a_pg_obj, $a_hier_id, $a_pc_id =
"")
49 $this->skill_node = $this->dom->create_element(
"Skills");
50 $this->skill_node = $this->node->append_child($this->skill_node);
62 $this->skill_node->set_attribute(
"Id", $a_skill_id);
63 $this->skill_node->set_attribute(
"User", $ilUser->getId());
73 if (is_object($this->skill_node))
75 return $this->skill_node->get_attribute(
"Id");
90 self::saveSkillUsage($a_page, $a_domdoc);
101 $a_page->getLanguage());
114 self::saveSkillUsage($a_page, $a_old_domdoc, $a_old_nr);
122 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
123 $skl_ids = self::collectSkills($a_page, $a_domdoc);
125 $a_page->getLanguage());
126 foreach($skl_ids as $skl_id)
128 if ((
int) $skl_id[
"inst_id"] <= 0)
131 $a_page->getLanguage());
141 $xpath =
new DOMXPath($a_domdoc);
142 $nodes = $xpath->query(
'//Skills');
145 foreach($nodes as
$node)
147 $user = $node->getAttribute(
"User");
148 $id = $node->getAttribute(
"Id");
149 $inst_id = $node->getAttribute(
"InstId");
150 $skl_ids[$user.
":".$id.
":".$inst_id] = array(
151 "user" => $user,
"id" => $id,
"inst_id" => $inst_id);
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
Create skill node in xml.
static afterPageUpdate($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
After page has been updated (or created)
static afterPageHistoryEntry($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
After page history entry has been created.
static collectSkills($a_page, $a_domdoc)
get all content includes that are used within the page
setType($a_type)
Set Type.
static beforePageDelete($a_page)
Before page is being deleted.
static saveSkillUsage($a_page, $a_domdoc, $a_old_nr=0)
save content include usages
static deleteAllUsages($a_pc_type, $a_usage_type, $a_usage_id, $a_usage_hist_nr=0, $a_lang="-")
Delete all usages.
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
setData($a_skill_id)
Set skill settings.
init()
Init page content component.
static saveUsage($a_pc_type, $a_pc_id, $a_usage_type, $a_usage_id, $a_usage_hist_nr=0, $a_lang="-")
Save usages.
setNode(&$a_node)
Set node.
getSkillId()
Get skill mode.