Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00037 class ilPageContent
00038 {
00039 var $ilias;
00040 var $type;
00041 var $hier_id;
00042 var $node;
00043
00048 function ilPageContent()
00049 {
00050 global $ilias;
00051
00052 $this->ilias =& $ilias;
00053 }
00054
00055
00056 function setType($a_type)
00057 {
00058 $this->type = $a_type;
00059 }
00060
00061 function getType()
00062 {
00063 return $this->type;
00064 }
00065
00068 function setNode(&$a_node)
00069 {
00070 $this->node =& $a_node;
00071 }
00072
00075 function &getNode()
00076 {
00077 return $this->node;
00078 }
00079
00080
00084 function setHierId($a_hier_id)
00085 {
00086 $this->hier_id = $a_hier_id;
00087 }
00088
00092 function getHierId()
00093 {
00094 return $this->hier_id;
00095 }
00096
00101 function incEdId($ed_id)
00102 {
00103 $id = explode("_", $ed_id);
00104 $id[count($id) - 1]++;
00105 return implode($id, "_");
00106 }
00107
00112 function decEdId($ed_id)
00113 {
00114 $id = explode("_", $ed_id);
00115 $id[count($id) - 1]--;
00116 return implode($id, "_");
00117 }
00118
00123 function haveSameContainer($ed_id1, $ed_id2)
00124 {
00125 $id1 = explode("_", $ed_id1);
00126 $id2 = explode("_", $ed_id1);
00127 if(count($id1) == count($id2))
00128 {
00129 array_pop($id1);
00130 array_pop($id2);
00131 foreach ($id1 as $key => $id)
00132 {
00133 if($id != $id2[$key])
00134 {
00135 return false;
00136 }
00137 }
00138 return true;
00139 }
00140 return false;
00141 }
00142
00143 }
00144 ?>