ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\Container\Page\PageManager Class Reference
+ Collaboration diagram for ILIAS\Container\Page\PageManager:

Public Member Functions

 __construct (InternalDomainService $domain_service, \ILIAS\Style\Content\DomainService $content_style_domain, \ilContainer $container, ?string $lang=null)
 
 getHtml ()
 
 getDom ()
 

Protected Attributes

string $lang = null
 
InternalDomainService $domain_service
 
ilContainer $container
 
ILIAS Style Content DomainService $content_style_domain
 

Detailed Description

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

Definition at line 12 of file class.PageManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Container\Page\PageManager::__construct ( InternalDomainService  $domain_service,
\ILIAS\Style\Content\DomainService  $content_style_domain,
\ilContainer  $container,
?string  $lang = null 
)

Definition at line 19 of file class.PageManager.php.

References ILIAS\Container\Page\PageManager\$container, ILIAS\Container\Page\PageManager\$content_style_domain, ILIAS\Container\Page\PageManager\$domain_service, ILIAS\Container\Page\PageManager\$lang, and ilObjectTranslation\getInstance().

24  {
25  $this->content_style_domain = $content_style_domain;
26  $this->domain_service = $domain_service;
27  $this->container = $container;
28  $user = $this->domain_service->user();
29  if (is_null($lang)) {
30  $ot = \ilObjectTranslation::getInstance($this->container->getId());
31  $this->lang = $ot->getEffectiveContentLang($user->getCurrentLanguage(), "cont");
32  } else {
33  $this->lang = $lang;
34  }
35  }
InternalDomainService $domain_service
ILIAS Style Content DomainService $content_style_domain
static getInstance(int $obj_id)
+ Here is the call graph for this function:

Member Function Documentation

◆ getDom()

ILIAS\Container\Page\PageManager::getDom ( )

Definition at line 67 of file class.PageManager.php.

References ILIAS\Container\Page\PageManager\$lang, ILIAS\LTI\ToolProvider\$settings, and ilPageUtil\_existsAndNotEmpty().

67  : ?\DOMDocument
68  {
69  $settings = $this->domain_service->settings();
70 
71  if (!$settings->get("enable_cat_page_edit") || $this->container->filteredSubtree()) {
72  return null;
73  }
74 
75  // if page does not exist, return nothing
77  "cont",
78  $this->container->getId(),
80  )) {
81  return null;
82  }
83 
84  // get page object
85  $page_gui = new \ilContainerPageGUI($this->container->getId(), 0, $this->lang);
86  $page = $page_gui->getPageObject();
87  $page->buildDom();
88  return $page->getDomDoc();
89  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
static _existsAndNotEmpty(string $a_parent_type, int $a_id, string $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages) ...
+ Here is the call graph for this function:

◆ getHtml()

ILIAS\Container\Page\PageManager::getHtml ( )

Definition at line 37 of file class.PageManager.php.

References ILIAS\Container\Page\PageManager\$lang, ILIAS\LTI\ToolProvider\$settings, and ilPageUtil\_existsAndNotEmpty().

37  : string
38  {
39  $settings = $this->domain_service->settings();
40 
41  if (!$settings->get("enable_cat_page_edit") || $this->container->filteredSubtree()) {
42  return "";
43  }
44 
45  // if page does not exist, return nothing
47  "cont",
48  $this->container->getId(),
50  )) {
51  return "";
52  }
53 
54  // get page object
55  $page_gui = new \ilContainerPageGUI($this->container->getId(), 0, $this->lang);
56  $style = $this->content_style_domain->styleForRefId($this->container->getRefId());
57  $page_gui->setStyleId($style->getEffectiveStyleId());
58 
59  $page_gui->setPresentationTitle("");
60  $page_gui->setTemplateOutput(false);
61  $page_gui->setHeader("");
62  $html = $page_gui->showPage();
63 
64  return $html;
65  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
static _existsAndNotEmpty(string $a_parent_type, int $a_id, string $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages) ...
+ Here is the call graph for this function:

Field Documentation

◆ $container

ilContainer ILIAS\Container\Page\PageManager::$container
protected

Definition at line 16 of file class.PageManager.php.

Referenced by ILIAS\Container\Page\PageManager\__construct().

◆ $content_style_domain

ILIAS Style Content DomainService ILIAS\Container\Page\PageManager::$content_style_domain
protected

Definition at line 17 of file class.PageManager.php.

Referenced by ILIAS\Container\Page\PageManager\__construct().

◆ $domain_service

InternalDomainService ILIAS\Container\Page\PageManager::$domain_service
protected

Definition at line 15 of file class.PageManager.php.

Referenced by ILIAS\Container\Page\PageManager\__construct().

◆ $lang

string ILIAS\Container\Page\PageManager::$lang = null
protected

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