ILIAS  trunk Revision v11.0_alpha-1862-g4e205cb56d4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.PageManager.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace 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 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
global $DIC
Definition: shib_login.php:22
$lang
Definition: xapiexit.php:25
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
ilErrorHandling $error
Definition: class.ilias.php:69