6 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
34 $this->
user = $DIC->user();
43 parent::setNode($a_node);
44 $this->skill_node = $a_node->first_child();
53 public function create(&$a_pg_obj, $a_hier_id, $a_pc_id =
"")
57 $this->skill_node = $this->dom->create_element(
"Skills");
58 $this->skill_node = $this->node->append_child($this->skill_node);
70 $this->skill_node->set_attribute(
"Id", $a_skill_id);
71 $this->skill_node->set_attribute(
"User",
$ilUser->getId());
81 if (is_object($this->skill_node)) {
82 return $this->skill_node->get_attribute(
"Id");
97 self::saveSkillUsage($a_page, $a_domdoc);
107 require_once(
'Services/COPage/classes/class.ilPageContentUsage.php');
110 $a_page->getParentType() .
":pg",
113 $a_page->getLanguage()
127 self::saveSkillUsage($a_page, $a_old_domdoc, $a_old_nr);
135 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
136 $skl_ids = self::collectSkills($a_page, $a_domdoc);
139 $a_page->getParentType() .
":pg",
142 $a_page->getLanguage()
144 foreach ($skl_ids as $skl_id) {
145 if ((
int) $skl_id[
"inst_id"] <= 0) {
149 $a_page->getParentType() .
":pg",
152 $a_page->getLanguage()
164 $nodes = $xpath->query(
'//Skills');
167 foreach ($nodes as
$node) {
168 $user = $node->getAttribute(
"User");
169 $id = $node->getAttribute(
"Id");
170 $inst_id = $node->getAttribute(
"InstId");
172 "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.
if(!array_key_exists('StateId', $_REQUEST)) $id
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.