ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.PageManager.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\COPage\Page;
22
27{
28 protected \ILIAS\COPage\Dom\DomUtil $dom_util;
29
30 public function __construct()
31 {
32 global $DIC;
33 $this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
34 }
35
36 public function get(
37 string $parent_type,
38 int $id = 0,
39 int $old_nr = 0,
40 string $lang = "-"
41 ): \ilPageObject {
42 return \ilPageObjectFactory::getInstance(
43 $parent_type,
44 $id,
45 $old_nr,
46 $lang
47 );
48 }
49
50 public function content(\DOMDocument $dom): PageContentManager
51 {
52 return new PageContentManager($dom);
53 }
54
55 public function contentFromXml($xml): PageContentManager
56 {
57 $error = "";
58 $dom = $this->dom_util->docFromString($xml, $error);
59 return new PageContentManager($dom);
60 }
61}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
ILIAS COPage Dom DomUtil $dom_util
ilErrorHandling $error
Definition: class.ilias.php:69
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26
$lang
Definition: xapiexit.php:25