55 $this->dom = $a_pg_obj->getDom();
58 die(
"Error: ilPageContent::init() did not set type");
69 $this->pg_obj = $a_val;
86 abstract public function init();
115 $this->node = $a_node;
160 $this->hier_id = $a_hier_id;
177 return $this->node->get_attribute(
"HierId");
187 if (is_object($this->node)) {
188 return $this->node->get_attribute(
"HierId");
199 $this->pcid = $a_pcid;
219 $this->file_download_link = $a_download_link;
239 $this->fullscreen_link = $a_fullscreen_link;
259 $this->sourcecode_download_script = $script_name;
280 if (is_object($this->node)) {
281 return $this->node->get_attribute(
"PCID");
290 if (is_object($this->node)) {
291 $this->node->set_attribute(
"PCID", $a_pc_id);
304 $id = explode(
"_", $ed_id);
307 return implode(
$id,
"_");
319 $id = explode(
"_", $ed_id);
322 return implode(
$id,
"_");
335 $id1 = explode(
"_", $ed_id1);
336 $id2 = explode(
"_", $ed_id1);
337 if (count($id1) == count($id2)) {
340 foreach ($id1 as
$key =>
$id) {
355 uasort($a_array, array(
"ilPageContent",
"isGreaterHierId"));
365 $a_arr = explode(
"_", $a);
366 $b_arr = explode(
"_", $b);
367 for (
$i = 0;
$i < count($a_arr);
$i++) {
368 if ((
int) $a_arr[
$i] > (int) $b_arr[
$i]) {
370 } elseif ((
int) $a_arr[$i] < (
int) $b_arr[$i]) {
385 if (is_object($this->node)) {
386 $this->node->set_attribute(
"Enabled", $value);
413 if (is_object($this->node) && $this->node->has_attribute(
"Enabled")) {
414 $compare = $this->node->get_attribute(
"Enabled");
419 return strcasecmp($compare,
"true") == 0;
427 $node = $this->dom->create_element(
"PageContent");
428 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.
if(!array_key_exists('StateId', $_REQUEST)) $id
$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.
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.