ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPCSection Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPCSection:
+ Collaboration diagram for ilPCSection:

Public Member Functions

 init ()
 
 setNode (php4DOMElement $a_node)
 
 create (ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
 
 setCharacteristic (string $a_char)
 
 getCharacteristic ()
 
 modifyPageContentPostXsl (string $a_output, string $a_mode, bool $a_abstract_only=false)
 
 setActiveFrom (int $a_unix_ts)
 
 getActiveFrom ()
 Get activation from. More...
 
 setActiveTo (int $a_unix_ts)
 Set activation to. More...
 
 getActiveTo ()
 
 getAttribute (string $a_attr)
 
 setPermission (string $a_val)
 Set permission. More...
 
 getPermission ()
 
 setPermissionRefId (int $a_ref_id)
 
 getPermissionRefId ()
 
 setNoLink ()
 Set no link. More...
 
 setExtLink (string $a_href)
 Set link of area to an external one. More...
 
 setIntLink (string $a_type, string $a_target, string $a_target_frame)
 Set link of area to an internal one. More...
 
 getLink ()
 
 handleAccess (string $a_html, string $a_mode)
 
 insertTimings (string $a_html)
 Insert timings (in edit mode) More...
 
 getProtected ()
 
 setProtected (bool $val)
 
 getModel ()
 
- Public Member Functions inherited from ilPageContent
 __construct (ilPageObject $a_pg_obj)
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 init ()
 Init object. More...
 
 getType ()
 
 setNode (php4DOMElement $a_node)
 Set xml node of page content. More...
 
 getNode ()
 
 getJavascriptFiles (string $a_mode)
 
 getCssFiles (string $a_mode)
 
 getOnloadCode (string $a_mode)
 
 setHierId (string $a_hier_id)
 
 getHierId ()
 
 lookupHierId ()
 
 readHierId ()
 
 setPcId (string $a_pcid)
 
 getPCId ()
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setProfileBackUrl (string $url)
 
 getProfileBackUrl ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 readPCId ()
 
 writePCId (string $a_pc_id)
 
 setEnabled (string $value)
 Set Enabled value for page content component. More...
 
 enable ()
 
 disable ()
 
 isEnabled ()
 
 createPageContentNode (bool $a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 modifyPageContentPostXsl (string $a_output, string $a_mode, bool $a_abstract_only=false)
 Modify page content after xsl. More...
 
 getModel ()
 Get model as needed for the front-end editor. More...
 

Static Public Member Functions

static getLangVars ()
 
static afterPageUpdate (ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
 After page has been updated (or created) More...
 
static saveTimings (ilPageObject $a_page)
 
static getCacheTriggerString (ilPageObject $a_page)
 Get page cache update trigger string. More...
 
- Static Public Member Functions inherited from ilPageContent
static incEdId (string $ed_id)
 Increases an hierarchical editing id at lowest level (last number) More...
 
static decEdId (string $ed_id)
 Decreases an hierarchical editing id at lowest level (last number) More...
 
static sortHierIds (array $a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static isGreaterHierId (string $a, string $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, bool $a_self_ass=true, bool $a_clone_mobs=false, int $new_parent_id=0, int $obj_copy_id=0)
 Handle copied content. More...
 
static afterPageUpdate (ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete (ilPageObject $a_page)
 Before page is being deleted. More...
 
static afterRepositoryCopy (ilPageObject $page, array $mapping, int $source_ref_id)
 After repository (container) copy action. More...
 
static afterPageHistoryEntry (ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr)
 After page history entry has been created. More...
 
static deleteHistoryLowerEqualThan (string $parent_type, int $page_id, string $lang, int $delete_lower_than_nr)
 Overwrite in derived classes, if old history entries are being deleted. More...
 

Data Fields

php4DOMElement $sec_node
 
- Data Fields inherited from ilPageContent
string $hier_id = ""
 
php4DOMElement $node = null
 
php4DOMDocument $dom = null
 
string $page_lang = ""
 

Protected Member Functions

 setAttribute (string $a_attr, string $a_val)
 
- Protected Member Functions inherited from ilPageContent
 setType (string $a_type)
 Set Type. More...
 

Protected Attributes

ilAccessHandler $access
 
ilCtrl $ctrl
 
ilLanguage $lng
 
- Protected Attributes inherited from ilPageContent
string $pcid
 
string $type = ""
 
ilPageObject $pg_obj
 
string $file_download_link
 
string $fullscreen_link
 
string $sourcecode_download_script
 
ilLogger $log
 
string $profile_back_url = ""
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilPCSection Section content object (see ILIAS DTD)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilPCSection.php.

Member Function Documentation

◆ afterPageUpdate()

static ilPCSection::afterPageUpdate ( ilPageObject  $a_page,
DOMDocument  $a_domdoc,
string  $a_xml,
bool  $a_creation 
)
static

After page has been updated (or created)

Definition at line 90 of file class.ilPCSection.php.

95  : void {
96  self::saveTimings($a_page);
97  }

◆ create()

ilPCSection::create ( ilPageObject  $a_pg_obj,
string  $a_hier_id,
string  $a_pc_id = "" 
)

Definition at line 47 of file class.ilPCSection.php.

References ilPageContent\createPageContentNode(), IL_INSERT_AFTER, and ilPageObject\insertContent().

51  : void {
52  $this->node = $this->createPageContentNode();
53  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
54  $this->sec_node = $this->dom->create_element("Section");
55  $this->sec_node = $this->node->append_child($this->sec_node);
56  $this->sec_node->set_attribute("Characteristic", "Block");
57  }
insertContent(ilPageContent $a_cont_obj, string $a_pos, int $a_mode=IL_INSERT_AFTER, string $a_pcid="", bool $remove_placeholder=true)
insert a content node before/after a sibling or as first child of a parent
const IL_INSERT_AFTER
createPageContentNode(bool $a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
+ Here is the call graph for this function:

◆ getActiveFrom()

ilPCSection::getActiveFrom ( )

Get activation from.

Definition at line 127 of file class.ilPCSection.php.

127  : int
128  {
129  if (is_object($this->sec_node)) {
130  return (int) $this->sec_node->get_attribute("ActiveFrom");
131  }
132  return 0;
133  }

◆ getActiveTo()

ilPCSection::getActiveTo ( )

Definition at line 149 of file class.ilPCSection.php.

149  : int
150  {
151  if (is_object($this->sec_node)) {
152  return (int) $this->sec_node->get_attribute("ActiveTo");
153  }
154  return 0;
155  }

◆ getAttribute()

ilPCSection::getAttribute ( string  $a_attr)

Definition at line 170 of file class.ilPCSection.php.

Referenced by getPermission(), and getPermissionRefId().

170  : string
171  {
172  if (is_object($this->sec_node)) {
173  return $this->sec_node->get_attribute($a_attr);
174  }
175  return "";
176  }
+ Here is the caller graph for this function:

◆ getCacheTriggerString()

static ilPCSection::getCacheTriggerString ( ilPageObject  $a_page)
static

Get page cache update trigger string.

Returns
string trigger string
Exceptions
ilDateTimeException

Definition at line 363 of file class.ilPCSection.php.

References $DIC, $ilDB, ilPageObject\getId(), ilPageObject\getParentType(), and IL_CAL_UNIX.

Referenced by ilPageObjectGUI\showPage().

365  : string {
366  global $DIC;
367 
368  $ilDB = $DIC->database();
369 
370  $set = $ilDB->query(
371  "SELECT * FROM copg_section_timings " .
372  " WHERE page_id = " . $ilDB->quote($a_page->getId(), "integer") .
373  " AND parent_type = " . $ilDB->quote($a_page->getParentType(), "text")
374  );
375  $str = "1"; // changed to 1 to force cache miss for #24277
376  $current_ts = new ilDateTime(time(), IL_CAL_UNIX);
377  $current_ts = $current_ts->get(IL_CAL_UNIX);
378  while ($rec = $ilDB->fetchAssoc($set)) {
379  $unix_ts = $rec["unix_ts"];
380  if ($unix_ts < $current_ts) {
381  $unix_ts .= "a";
382  }
383  $str .= "-" . $unix_ts;
384  }
385 
386  return $str;
387  }
const IL_CAL_UNIX
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCharacteristic()

ilPCSection::getCharacteristic ( )

Definition at line 70 of file class.ilPCSection.php.

70  : string
71  {
72  if (is_object($this->sec_node)) {
73  $char = $this->sec_node->get_attribute("Characteristic");
74  if (substr($char, 0, 4) == "ilc_") {
75  $char = substr($char, 4);
76  }
77  return $char;
78  }
79  return "";
80  }

◆ getLangVars()

static ilPCSection::getLangVars ( )
static

Definition at line 82 of file class.ilPCSection.php.

82  : array
83  {
84  return array("ed_insert_section");
85  }

◆ getLink()

ilPCSection::getLink ( )

Definition at line 254 of file class.ilPCSection.php.

254  : array
255  {
256  $childs = $this->sec_node->child_nodes();
257  foreach ($childs as $child) {
258  if ($child->node_name() == "ExtLink") {
259  return array("LinkType" => "ExtLink",
260  "Href" => $child->get_attribute("Href"));
261  }
262  if ($child->node_name() == "IntLink") {
263  return array("LinkType" => "IntLink",
264  "Target" => $child->get_attribute("Target"),
265  "Type" => $child->get_attribute("Type"),
266  "TargetFrame" => $child->get_attribute("TargetFrame"));
267  }
268  }
269  return array("LinkType" => "NoLink");
270  }

◆ getModel()

ilPCSection::getModel ( )

Definition at line 453 of file class.ilPCSection.php.

References getProtected().

453  : ?stdClass
454  {
455  if ($this->sec_node->node_name() != "Section") {
456  return null;
457  }
458  $model = new stdClass();
459  $model->protected = $this->getProtected();
460 
461  return $model;
462  }
+ Here is the call graph for this function:

◆ getPermission()

ilPCSection::getPermission ( )

Definition at line 187 of file class.ilPCSection.php.

References getAttribute().

187  : string
188  {
189  return $this->getAttribute("Permission");
190  }
getAttribute(string $a_attr)
+ Here is the call graph for this function:

◆ getPermissionRefId()

ilPCSection::getPermissionRefId ( )

Definition at line 197 of file class.ilPCSection.php.

References $id, getAttribute(), and IL_INST_ID.

197  : int
198  {
199  $id = explode("_", $this->getAttribute("PermissionRefId"));
200  if (isset($id[3]) && in_array($id[1], array("", 0, IL_INST_ID))) {
201  return (int) $id[3];
202  }
203  return 0;
204  }
const IL_INST_ID
Definition: constants.php:40
getAttribute(string $a_attr)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getProtected()

ilPCSection::getProtected ( )

Definition at line 435 of file class.ilPCSection.php.

Referenced by getModel().

435  : bool
436  {
437  if (is_object($this->sec_node)) {
438  return ($this->sec_node->get_attribute("Protected") == "1");
439  }
440 
441  return false;
442  }
+ Here is the caller graph for this function:

◆ handleAccess()

ilPCSection::handleAccess ( string  $a_html,
string  $a_mode 
)

Definition at line 273 of file class.ilPCSection.php.

References $access, $id, ilRBACAccessHandler\checkAccess(), ilPageObjectGUI\EDIT, and IL_INST_ID.

Referenced by modifyPageContentPostXsl().

276  : string {
277  $ilAccess = $this->access;
278 
279  while (($start = strpos($a_html, "{{{{{Section;Access;")) > 0) {
280  $end = strpos($a_html, "}}}}}", $start);
281  $access_attr = explode(";", substr($a_html, $start, $end - $start));
282  $id = explode("_", $access_attr[3]);
283  $section_nr = $access_attr[6];
284  $access = true;
285  if (in_array($id[1], array("", 0, IL_INST_ID)) && $id[3] > 0) {
286  if ($access_attr[5] == "no_read") {
287  $access = !$ilAccess->checkAccess("read", "", $id[3]);
288  } else {
289  $access = $ilAccess->checkAccess($access_attr[5], "", $id[3]);
290  }
291  }
292  if ($a_mode == ilPageObjectGUI::EDIT) {
293  $access = true;
294  }
295  $end_limiter = "{{{{{Section;AccessEnd;" . $section_nr . "}}}}}";
296  if ($access) {
297  $a_html = substr($a_html, 0, $start) . substr($a_html, $end + 5);
298  $a_html = str_replace($end_limiter, "", $a_html);
299  } else {
300  $end = strpos($a_html, $end_limiter, $start);
301  $a_html = substr($a_html, 0, $start) . substr($a_html, $end + strlen($end_limiter));
302  }
303  }
304 
305  $a_html = str_replace("{{{{{Section;Access}}}}}", "", $a_html);
306  return $a_html;
307  }
const IL_INST_ID
Definition: constants.php:40
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

ilPCSection::init ( )

Definition at line 31 of file class.ilPCSection.php.

References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilPageContent\setType().

31  : void
32  {
33  global $DIC;
34 
35  $this->access = $DIC->access();
36  $this->ctrl = $DIC->ctrl();
37  $this->lng = $DIC->language();
38  $this->setType("sec");
39  }
setType(string $a_type)
Set Type.
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ insertTimings()

ilPCSection::insertTimings ( string  $a_html)

Insert timings (in edit mode)

Exceptions
ilDateTimeException

Definition at line 393 of file class.ilPCSection.php.

References $i, $lng, $param, ilDatePresentation\formatDate(), IL_CAL_UNIX, ilDatePresentation\setUseRelativeDates(), and ilLanguage\txt().

395  : string {
396  $lng = $this->lng;
397 
398  $end = 0;
399  $start = strpos($a_html, "{{{{{Section;ActiveFrom");
400  if (is_int($start)) {
401  $end = strpos($a_html, "}}}}}", $start);
402  }
403  $i = 1;
404  while ($end > 0) {
405  $param = substr($a_html, $start + 13, $end - $start - 13);
406  $param = explode(";", $param);
407  $from = $param[1];
408  $to = $param[3];
409  $html = "";
410  if ($from != "") {
412  $from = new ilDateTime($from, IL_CAL_UNIX);
413  $html .= $lng->txt("cont_active_from") . ": " . ilDatePresentation::formatDate($from);
414  }
415  if ($to != "") {
416  $to = new ilDateTime($to, IL_CAL_UNIX);
417  $html .= " " . $lng->txt("cont_active_to") . ": " . ilDatePresentation::formatDate($to);
418  }
419 
420  $h2 = substr($a_html, 0, $start) .
421  $html .
422  substr($a_html, $end + 5);
423  $a_html = $h2;
424  $i++;
425 
426  $start = strpos($a_html, "{{{{{Section;ActiveFrom;", $start + 5);
427  $end = 0;
428  if (is_int($start)) {
429  $end = strpos($a_html, "}}}}}", $start);
430  }
431  }
432  return $a_html;
433  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
$param
Definition: xapitoken.php:46
ilLanguage $lng
static setUseRelativeDates(bool $a_status)
set use relative dates
$i
Definition: metadata.php:41
+ Here is the call graph for this function:

◆ modifyPageContentPostXsl()

ilPCSection::modifyPageContentPostXsl ( string  $a_output,
string  $a_mode,
bool  $a_abstract_only = false 
)
Exceptions
ilDateTimeException

Definition at line 102 of file class.ilPCSection.php.

References handleAccess().

106  : string {
107  $a_output = self::insertTimings($a_output);
108  $a_output = $this->handleAccess($a_output, $a_mode);
109 
110  return $a_output;
111  }
handleAccess(string $a_html, string $a_mode)
+ Here is the call graph for this function:

◆ saveTimings()

static ilPCSection::saveTimings ( ilPageObject  $a_page)
static

Definition at line 309 of file class.ilPCSection.php.

References $DIC, $i, $ilDB, $path, $res, $xml, domxml_open_mem(), ilPageObject\getId(), ilPageObject\getParentType(), ilPageObject\getXMLFromDom(), xpath_eval(), and xpath_new_context().

311  : void {
312  global $DIC;
313 
314  $ilDB = $DIC->database();
315 
316  $ilDB->manipulate(
317  "DELETE FROM copg_section_timings WHERE " .
318  " page_id = " . $ilDB->quote($a_page->getId(), "integer") .
319  " AND parent_type = " . $ilDB->quote($a_page->getParentType(), "text")
320  );
321 
322  $xml = $a_page->getXMLFromDom();
323 
324  $doc = domxml_open_mem($xml);
325 
326  // media aliases
327  $xpc = xpath_new_context($doc);
328  $path = "//Section";
329  $res = xpath_eval($xpc, $path);
330  for ($i = 0; $i < count($res->nodeset); $i++) {
331  $from = $res->nodeset[$i]->get_attribute("ActiveFrom");
332  if ($from != "") {
333  $ilDB->replace(
334  "copg_section_timings",
335  array(
336  "page_id" => array("integer", $a_page->getId()),
337  "parent_type" => array("text", $a_page->getParentType()),
338  "unix_ts" => array("integer", $from)
339  ),
340  array()
341  );
342  }
343  $to = $res->nodeset[$i]->get_attribute("ActiveTo");
344  if ($to != "") {
345  $ilDB->replace(
346  "copg_section_timings",
347  array(
348  "page_id" => array("integer", $a_page->getId()),
349  "parent_type" => array("text", $a_page->getParentType()),
350  "unix_ts" => array("integer", $to)
351  ),
352  array()
353  );
354  }
355  }
356  }
xpath_eval(php4DOMXPath $xpath_context, string $eval_str, $contextnode=null)
$res
Definition: ltiservices.php:69
$path
Definition: ltiservices.php:32
global $DIC
Definition: feed.php:28
xpath_new_context($dom_document)
getXMLFromDom(bool $a_incl_head=false, bool $a_append_mobs=false, bool $a_append_bib=false, string $a_append_str="", bool $a_omit_pageobject_tag=false, int $style_id=0)
get xml content of page from dom (use this, if any changes are made to the document) ...
domxml_open_mem($str, $mode=0, &$error=null)
$xml
Definition: metadata.php:351
$i
Definition: metadata.php:41
+ Here is the call graph for this function:

◆ setActiveFrom()

ilPCSection::setActiveFrom ( int  $a_unix_ts)

Definition at line 113 of file class.ilPCSection.php.

113  : void
114  {
115  if ($a_unix_ts > 0) {
116  $this->sec_node->set_attribute("ActiveFrom", $a_unix_ts);
117  } else {
118  if ($this->sec_node->has_attribute("ActiveFrom")) {
119  $this->sec_node->remove_attribute("ActiveFrom");
120  }
121  }
122  }

◆ setActiveTo()

ilPCSection::setActiveTo ( int  $a_unix_ts)

Set activation to.

Definition at line 138 of file class.ilPCSection.php.

138  : void
139  {
140  if ($a_unix_ts > 0) {
141  $this->sec_node->set_attribute("ActiveTo", $a_unix_ts);
142  } else {
143  if ($this->sec_node->has_attribute("ActiveTo")) {
144  $this->sec_node->remove_attribute("ActiveTo");
145  }
146  }
147  }

◆ setAttribute()

ilPCSection::setAttribute ( string  $a_attr,
string  $a_val 
)
protected

Definition at line 157 of file class.ilPCSection.php.

Referenced by setPermission(), and setPermissionRefId().

160  : void {
161  if (!empty($a_val)) {
162  $this->sec_node->set_attribute($a_attr, $a_val);
163  } else {
164  if ($this->sec_node->has_attribute($a_attr)) {
165  $this->sec_node->remove_attribute($a_attr);
166  }
167  }
168  }
+ Here is the caller graph for this function:

◆ setCharacteristic()

ilPCSection::setCharacteristic ( string  $a_char)

Definition at line 59 of file class.ilPCSection.php.

59  : void
60  {
61  if (!empty($a_char)) {
62  $this->sec_node->set_attribute("Characteristic", $a_char);
63  } else {
64  if ($this->sec_node->has_attribute("Characteristic")) {
65  $this->sec_node->remove_attribute("Characteristic");
66  }
67  }
68  }

◆ setExtLink()

ilPCSection::setExtLink ( string  $a_href)

Set link of area to an external one.

Definition at line 217 of file class.ilPCSection.php.

References $attributes, ilDOMUtil\setFirstOptionalElement(), and setNoLink().

217  : void
218  {
219  $this->setNoLink();
220  if (trim($a_href) != "") {
221  $attributes = array("Href" => trim($a_href));
223  $this->dom,
224  $this->sec_node,
225  "ExtLink",
226  array(""),
227  "",
229  );
230  }
231  }
$attributes
Definition: metadata.php:248
setNoLink()
Set no link.
static setFirstOptionalElement(php4DOMDocument $doc, php4DOMElement $parent_node, string $a_node_name, array $a_successors, string $a_content, array $a_attributes, bool $a_remove_childs=true)
searches for an element $a_node_name within the childs of $parent_node if no node is found...
+ Here is the call graph for this function:

◆ setIntLink()

ilPCSection::setIntLink ( string  $a_type,
string  $a_target,
string  $a_target_frame 
)

Set link of area to an internal one.

Definition at line 236 of file class.ilPCSection.php.

References $attributes, ilDOMUtil\setFirstOptionalElement(), and setNoLink().

240  : void {
241  $this->setNoLink();
242  $attributes = array("Type" => $a_type, "Target" => $a_target,
243  "TargetFrame" => $a_target_frame);
245  $this->dom,
246  $this->sec_node,
247  "IntLink",
248  array(""),
249  "",
251  );
252  }
$attributes
Definition: metadata.php:248
setNoLink()
Set no link.
static setFirstOptionalElement(php4DOMDocument $doc, php4DOMElement $parent_node, string $a_node_name, array $a_successors, string $a_content, array $a_attributes, bool $a_remove_childs=true)
searches for an element $a_node_name within the childs of $parent_node if no node is found...
+ Here is the call graph for this function:

◆ setNode()

ilPCSection::setNode ( php4DOMElement  $a_node)

Definition at line 41 of file class.ilPCSection.php.

References php4DOMNode\first_child().

41  : void
42  {
43  parent::setNode($a_node); // this is the PageContent node
44  $this->sec_node = $a_node->first_child(); // this is the Section node
45  }
+ Here is the call graph for this function:

◆ setNoLink()

ilPCSection::setNoLink ( )

Set no link.

Definition at line 209 of file class.ilPCSection.php.

References ilDOMUtil\deleteAllChildsByName().

Referenced by setExtLink(), and setIntLink().

209  : void
210  {
211  ilDOMUtil::deleteAllChildsByName($this->sec_node, array("IntLink", "ExtLink"));
212  }
static deleteAllChildsByName(php4DOMElement $a_parent, array $a_node_names)
delete all childs of a node by names in $a_node_names
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPermission()

ilPCSection::setPermission ( string  $a_val)

Set permission.

Parameters
string$a_val"read"|"write"|"visible"|"no_read"

Definition at line 182 of file class.ilPCSection.php.

References setAttribute().

182  : void
183  {
184  $this->setAttribute("Permission", $a_val);
185  }
setAttribute(string $a_attr, string $a_val)
+ Here is the call graph for this function:

◆ setPermissionRefId()

ilPCSection::setPermissionRefId ( int  $a_ref_id)

Definition at line 192 of file class.ilPCSection.php.

References setAttribute().

192  : void
193  {
194  $this->setAttribute("PermissionRefId", "il__ref_" . $a_ref_id);
195  }
setAttribute(string $a_attr, string $a_val)
+ Here is the call graph for this function:

◆ setProtected()

ilPCSection::setProtected ( bool  $val)

Definition at line 444 of file class.ilPCSection.php.

444  : void
445  {
446  if ($val) {
447  $this->sec_node->set_attribute("Protected", "1");
448  } else {
449  $this->sec_node->set_attribute("Protected", "0");
450  }
451  }

Field Documentation

◆ $access

ilAccessHandler ilPCSection::$access
protected

Definition at line 26 of file class.ilPCSection.php.

Referenced by handleAccess().

◆ $ctrl

ilCtrl ilPCSection::$ctrl
protected

Definition at line 27 of file class.ilPCSection.php.

◆ $lng

ilLanguage ilPCSection::$lng
protected

Definition at line 28 of file class.ilPCSection.php.

Referenced by insertTimings().

◆ $sec_node

php4DOMElement ilPCSection::$sec_node

Definition at line 29 of file class.ilPCSection.php.


The documentation for this class was generated from the following file: