ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilContainerStartObjectsContentGUI Class Reference

Class ilContainerStartObjectsContentGUI. More...

+ Collaboration diagram for ilContainerStartObjectsContentGUI:

Public Member Functions

 __construct (ilContainerGUI $a_gui, ilContainer $a_parent_obj)
 
 enableDesktop (bool $a_value, ilContainerGUI $a_parent_gui)
 
 getHTML ()
 

Protected Member Functions

 getPageHTML ()
 

Protected Attributes

ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilSetting $settings
 
ilObjUser $user
 
ilContainerStartObjects $start_object
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
bool $enable_desktop
 
ilContainerGUI $parent_gui
 
ilContainer $parent_obj
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilContainerStartObjectsContentGUI::__construct ( ilContainerGUI  $a_gui,
ilContainer  $a_parent_obj 
)

Definition at line 43 of file class.ilContainerStartObjectsContentGUI.php.

References $DIC, ilObject\getId(), ilObject\getRefId(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\user().

46  {
47  global $DIC;
48 
49  $this->tpl = $DIC["tpl"];
50  $this->lng = $DIC->language();
51  $this->settings = $DIC->settings();
52  $this->user = $DIC->user();
53  $this->ui_factory = $DIC->ui()->factory();
54  $this->ui_renderer = $DIC->ui()->renderer();
55  $this->parent_gui = $a_gui;
56  $this->parent_obj = $a_parent_obj;
57  $this->start_object = new ilContainerStartObjects(
58  $a_parent_obj->getRefId(),
59  $a_parent_obj->getId()
60  );
61  $cs = $DIC->contentStyle();
62  $this->content_style_domain = $cs->domain()->styleForRefId($a_parent_obj->getRefId());
63  $this->content_style_gui = $cs->gui();
64  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ enableDesktop()

ilContainerStartObjectsContentGUI::enableDesktop ( bool  $a_value,
ilContainerGUI  $a_parent_gui 
)

Definition at line 66 of file class.ilContainerStartObjectsContentGUI.php.

69  : void {
70  $this->enable_desktop = $a_value;
71 
72  if ($this->enable_desktop) {
73  $this->parent_gui = $a_parent_gui;
74  }
75  }

◆ getHTML()

ilContainerStartObjectsContentGUI::getHTML ( )

Definition at line 78 of file class.ilContainerStartObjectsContentGUI.php.

References $lng, $tpl, getPageHTML(), ilLanguage\loadLanguageModule(), and ILIAS\UICore\GlobalTemplate\setContent().

78  : void
79  {
80  $tpl = $this->tpl;
81  $lng = $this->lng;
82 
83  $lng->loadLanguageModule("crs");
84 
85  $tbl = new ObjectsContent(
86  $this->parent_gui,
87  $this->start_object,
88  $this->ui_factory,
89  $this->ui_renderer,
90  $this->enable_desktop
91  );
93  $this->getPageHTML() .
94  $tbl->render()
95  );
96  }
setContent(string $a_html)
Sets content for standard template.
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ getPageHTML()

ilContainerStartObjectsContentGUI::getPageHTML ( )
protected

Definition at line 98 of file class.ilContainerStartObjectsContentGUI.php.

References $ilSetting, $settings, $tpl, ilPageUtil\_existsAndNotEmpty(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), and ILIAS\UICore\GlobalTemplate\setVariable().

Referenced by getHTML().

98  : string
99  {
100  $tpl = $this->tpl;
102 
103  if (!$ilSetting->get("enable_cat_page_edit")) {
104  return "";
105  }
106 
107  $page_id = $this->start_object->getObjId();
108 
109  // if page does not exist, return nothing
110  if (!ilPageUtil::_existsAndNotEmpty("cstr", $page_id)) {
111  return "";
112  }
113 
114  $this->content_style_gui->addCss($tpl, $this->parent_obj->getRefId());
115  $tpl->setCurrentBlock("SyntaxStyle");
116  $tpl->setVariable(
117  "LOCATION_SYNTAX_STYLESHEET",
119  );
121 
122  $page_gui = new ilContainerStartObjectsPageGUI($page_id);
123 
124  $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
125 
126  $page_gui->setPresentationTitle("");
127  $page_gui->setTemplateOutput(false);
128  $page_gui->setHeader("");
129  return $page_gui->showPage();
130  }
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
Container start objects page GUI class.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
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) ...
global $ilSetting
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilContainerStartObjectsContentGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilContainerStartObjectsContentGUI::$content_style_gui
protected

Definition at line 40 of file class.ilContainerStartObjectsContentGUI.php.

◆ $enable_desktop

bool ilContainerStartObjectsContentGUI::$enable_desktop
protected

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

◆ $lng

ilLanguage ilContainerStartObjectsContentGUI::$lng
protected

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

Referenced by getHTML().

◆ $parent_gui

ilContainerGUI ilContainerStartObjectsContentGUI::$parent_gui
protected

Definition at line 38 of file class.ilContainerStartObjectsContentGUI.php.

◆ $parent_obj

ilContainer ilContainerStartObjectsContentGUI::$parent_obj
protected

Definition at line 39 of file class.ilContainerStartObjectsContentGUI.php.

◆ $settings

ilSetting ilContainerStartObjectsContentGUI::$settings
protected

Definition at line 32 of file class.ilContainerStartObjectsContentGUI.php.

Referenced by getPageHTML().

◆ $start_object

ilContainerStartObjects ilContainerStartObjectsContentGUI::$start_object
protected

Definition at line 34 of file class.ilContainerStartObjectsContentGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilContainerStartObjectsContentGUI::$tpl
protected

Definition at line 30 of file class.ilContainerStartObjectsContentGUI.php.

Referenced by getHTML(), and getPageHTML().

◆ $ui_factory

UIFactory ilContainerStartObjectsContentGUI::$ui_factory
protected

Definition at line 35 of file class.ilContainerStartObjectsContentGUI.php.

◆ $ui_renderer

UIRenderer ilContainerStartObjectsContentGUI::$ui_renderer
protected

Definition at line 36 of file class.ilContainerStartObjectsContentGUI.php.

◆ $user

ilObjUser ilContainerStartObjectsContentGUI::$user
protected

Definition at line 33 of file class.ilContainerStartObjectsContentGUI.php.


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