ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPCSectionModelProvider.php
Go to the documentation of this file.
1<?php
2
21
23{
24 public function getModels(
25 DomUtil $dom_util,
26 \ilPageObject $page
27 ): array {
28 $models = [];
29
30 foreach ($dom_util->path($page->getDomDoc(), "//Section") as $node) {
31 $par = $node->parentNode;
32 $pc_id = $par->getAttribute("PCID");
33
34 $model = new stdClass();
35 $model->protected = ($node->getAttribute("Protected") === "1");
36
37 $models[$pc_id] = $model;
38 }
39
40 return $models;
41 }
42}
path(\DOMDocument $doc, string $path)
getModels(DomUtil $dom_util, \ilPageObject $page)
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
getDomDoc()
Get dom doc (DOMDocument)