ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilContainerStartObjectsContentGUI Class Reference

Class ilContainerStartObjectsContentGUI. More...

+ Collaboration diagram for ilContainerStartObjectsContentGUI:

Public Member Functions

 __construct ($a_gui, ilContainer $a_parent_obj)
 Constructor. More...
 
 enableDesktop ($a_value, ilContainerGUI $a_parent_gui)
 Toggle add-to/remove-from-desktop. More...
 
 getHTML ()
 Get container start objects list (presentation) More...
 

Protected Member Functions

 getPageHTML ()
 Render COPage. More...
 

Protected Attributes

 $tpl
 
 $lng
 
 $settings
 
 $user
 
 $start_object
 
 $enable_desktop
 
 $parent_gui
 
 $parent_obj
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
ilContainer$a_parent_obj

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

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

45  {
46  global $DIC;
47 
48  $this->tpl = $DIC["tpl"];
49  $this->lng = $DIC->language();
50  $this->settings = $DIC->settings();
51  $this->user = $DIC->user();
52  include_once "Services/Container/classes/class.ilContainerStartObjects.php";
53  $this->parent_gui = $a_gui;
54  $this->parent_obj = $a_parent_obj;
55  $this->start_object = new ilContainerStartObjects(
56  $a_parent_obj->getRefId(),
57  $a_parent_obj->getId()
58  );
59  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
getId()
get object id public
settings()
Definition: settings.php:2
getRefId()
get reference id public
+ Here is the call graph for this function:

Member Function Documentation

◆ enableDesktop()

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

Toggle add-to/remove-from-desktop.

Parameters
bool$a_value
ilContainerGUI$a_parent_gui

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

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

◆ getHTML()

ilContainerStartObjectsContentGUI::getHTML ( )

Get container start objects list (presentation)

Returns
string

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

References $lng, $tbl, $tpl, and getPageHTML().

82  {
83  $tpl = $this->tpl;
84  $lng = $this->lng;
85 
86  $lng->loadLanguageModule("crs");
87 
88  include_once "Services/Container/classes/class.ilContainerStartObjectsContentTableGUI.php";
90  $this->parent_gui,
91  "",
92  $this->start_object,
93  $this->enable_desktop
94  );
95  $tpl->setContent(
96  $this->getPageHTML() .
97  $tbl->getHTML()
98  );
99  }
$tbl
Definition: example_048.php:81
+ Here is the call graph for this function:

◆ getPageHTML()

ilContainerStartObjectsContentGUI::getPageHTML ( )
protected

Render COPage.

See also
ilContainerGUI
Returns
string

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

References $ilSetting, $ilUser, $settings, $tpl, $user, ilPageUtil\_existsAndNotEmpty(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), and ilObjStyleSheet\getSyntaxStylePath().

Referenced by getHTML().

108  {
109  $tpl = $this->tpl;
112 
113  if (!$ilSetting->get("enable_cat_page_edit")) {
114  return;
115  }
116 
117  $page_id = $this->start_object->getObjId();
118 
119  // if page does not exist, return nothing
120  include_once("./Services/COPage/classes/class.ilPageUtil.php");
121  if (!ilPageUtil::_existsAndNotEmpty("cstr", $page_id)) {
122  return;
123  }
124 
125  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
126  $tpl->setVariable(
127  "LOCATION_CONTENT_STYLESHEET",
129  $this->parent_obj->getStyleSheetId(),
130  $this->parent_obj->getType()
131  ))
132  );
133  $tpl->setCurrentBlock("SyntaxStyle");
134  $tpl->setVariable(
135  "LOCATION_SYNTAX_STYLESHEET",
137  );
138  $tpl->parseCurrentBlock();
139 
140  include_once("./Services/Container/classes/class.ilContainerStartObjectsPageGUI.php");
141  $page_gui = new ilContainerStartObjectsPageGUI($page_id);
142 
143  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
144  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
145  $this->parent_obj->getStyleSheetId(),
146  $this->parent_obj->getType()
147  ));
148 
149  $page_gui->setPresentationTitle("");
150  $page_gui->setTemplateOutput(false);
151  $page_gui->setHeader("");
152  return $page_gui->showPage();
153  }
Container start objects page GUI class.
static _existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages) ...
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
$ilUser
Definition: imgupload.php:18
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $enable_desktop

ilContainerStartObjectsContentGUI::$enable_desktop
protected

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

◆ $lng

ilContainerStartObjectsContentGUI::$lng
protected

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

Referenced by getHTML().

◆ $parent_gui

ilContainerStartObjectsContentGUI::$parent_gui
protected

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

◆ $parent_obj

ilContainerStartObjectsContentGUI::$parent_obj
protected

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

◆ $settings

ilContainerStartObjectsContentGUI::$settings
protected

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

Referenced by getPageHTML().

◆ $start_object

ilContainerStartObjectsContentGUI::$start_object
protected

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

◆ $tpl

ilContainerStartObjectsContentGUI::$tpl
protected

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

Referenced by getHTML(), and getPageHTML().

◆ $user

ilContainerStartObjectsContentGUI::$user
protected

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

Referenced by getPageHTML().


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