55 $this->dom = $a_pg_obj->getDom();
59 die (
"Error: ilPageContent::init() did not set type");
70 $this->pg_obj = $a_val;
87 abstract function init();
116 $this->node = $a_node;
161 $this->hier_id = $a_hier_id;
178 return $this->node->get_attribute(
"HierId");
188 if (is_object($this->node))
190 return $this->node->get_attribute(
"HierId");
201 $this->pcid = $a_pcid;
221 $this->file_download_link = $a_download_link;
241 $this->fullscreen_link = $a_fullscreen_link;
261 $this->sourcecode_download_script = $script_name;
282 if (is_object($this->node))
284 return $this->node->get_attribute(
"PCID");
293 if (is_object($this->node))
295 $this->node->set_attribute(
"PCID", $a_pc_id);
308 $id = explode(
"_", $ed_id);
309 $id[count($id) - 1]++;
311 return implode($id,
"_");
323 $id = explode(
"_", $ed_id);
324 $id[count($id) - 1]--;
326 return implode($id,
"_");
339 $id1 = explode(
"_", $ed_id1);
340 $id2 = explode(
"_", $ed_id1);
341 if(count($id1) == count($id2))
345 foreach ($id1 as $key => $id)
347 if($id != $id2[$key])
362 uasort($a_array,
array(
"ilPageContent",
"isGreaterHierId"));
372 $a_arr = explode(
"_", $a);
373 $b_arr = explode(
"_", $b);
374 for ($i = 0; $i < count($a_arr); $i++)
376 if ((
int) $a_arr[$i] > (int) $b_arr[$i])
380 else if ((
int) $a_arr[$i] < (int) $b_arr[$i])
396 if (is_object($this->node))
398 $this->node->set_attribute(
"Enabled", $value);
425 if (is_object($this->node) && $this->node->has_attribute(
"Enabled"))
427 $compare = $this->node->get_attribute(
"Enabled");
434 return strcasecmp($compare,
"true") == 0;
442 $node = $this->dom->create_element(
"PageContent");
443 if ($a_set_this_node)
setPcId($a_pcid)
Set PC Id.
getSourcecodeDownloadScript()
Get sourcecode download script.
setNode($a_node)
Set xml node of page content.
static incEdId($ed_id)
Increases an hierarchical editing id at lowest level (last number)
lookupHierId()
Get hierarchical id from dom.
getOnloadCode($a_mode)
Get on load code.
disable()
Disable page content.
getType()
Get type of page content.
static sortHierIds($a_array)
Sort an array of Hier IDS in ascending order.
& getNode()
Get xml node of page content.
setEnabled($value)
Set Enabled value for page content component.
static getLangVars()
Get lang vars needed for editing.
$sourcecode_download_script
static beforePageDelete($a_page)
Before page is being deleted.
setType($a_type)
Set Type.
modifyPageContentPostXsl($a_output, $a_mode)
Modify page content after xsl.
static haveSameContainer($ed_id1, $ed_id2)
Check, if two ids are in same container.
setFullscreenLink($a_fullscreen_link)
Set fullscreen link.
__construct($a_pg_obj)
Constructor.
enable()
Enable page content.
static handleCopiedContent(DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
Handle copied content.
static afterPageUpdate($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
After page has been updated (or created)
isEnabled()
Check whether page content is enabled.
getJavascriptFiles($a_mode)
Get Javascript files.
setSourcecodeDownloadScript($script_name)
Set sourcecode download script.
static afterPageHistoryEntry($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
After page history entry has been created.
writePCId($a_pc_id)
Write pc id.
getFullscreenLink()
Get fullscreen link.
getHierId()
Get hierarchical id.
Create styles array
The data for the language used.
setFileDownloadLink($a_download_link)
Set file download link.
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
static decEdId($ed_id)
Decreases an hierarchical editing id at lowest level (last number)
getCssFiles($a_mode)
Get css files.
static getLogger($a_component_id)
Get component logger.
getFileDownloadLink()
Get file download link.
static isGreaterHierId($a, $b)
Check whether Hier ID $a is greater than Hier ID $b.
setHierId($a_hier_id)
Set hierarchical ID in xml structure.