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);
100 require_once(
'Services/COPage/classes/class.ilPageContentUsage.php');
102 $a_page->getLanguage());
115 self::saveSkillUsage($a_page, $a_old_domdoc, $a_old_nr);
123 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
124 $skl_ids = self::collectSkills($a_page, $a_domdoc);
126 $a_page->getLanguage());
127 foreach($skl_ids as $skl_id)
129 if ((
int) $skl_id[
"inst_id"] <= 0)
132 $a_page->getLanguage());
142 $xpath =
new DOMXPath($a_domdoc);
143 $nodes = $xpath->query(
'//Skills');
146 foreach($nodes as
$node)
148 $user = $node->getAttribute(
"User");
149 $id = $node->getAttribute(
"Id");
150 $inst_id = $node->getAttribute(
"InstId");
151 $skl_ids[$user.
":".$id.
":".$inst_id] =
array(
152 "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
Create styles array
The data for the language used.
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.