ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContainerSessionsContentGUI Class Reference

Shows all items in one block. More...

+ Inheritance diagram for ilContainerSessionsContentGUI:
+ Collaboration diagram for ilContainerSessionsContentGUI:

Public Member Functions

 __construct ($container_gui_obj)
 Constructor. More...
 
 getDetailsLevel ($a_session_id)
 get details level More...
 
 getMainContent ()
 Get content HTML for main column. More...
 
 __showMaterials ($a_tpl)
 Show Materials. More...
 
 addFooterRow ($tpl)
 add footer row More...
 
- Public Member Functions inherited from ilContainerContentGUI
 __construct (&$container_gui_obj)
 Constructor. More...
 
 getContainerObject ()
 Get container object. More...
 
 getContainerGUI ()
 Get container GUI object. More...
 
 setOutput ()
 Sets view output into column layout. More...
 
 getMainContent ()
 Get content HTML for main column, this one must be overwritten in derived classes. More...
 
 determinePageEmbeddedBlocks ($a_container_page_html)
 Determine all blocks that are embedded in the container page. More...
 
 addEmbeddedBlock ($block_type, $block_parameter)
 Add embedded block. More...
 
 getEmbeddedBlocks ()
 Get page embedded blocks. More...
 
 renderPageEmbeddedBlocks ()
 Render Page Embedded Blocks. More...
 
 renderItem ($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
 Render an item. More...
 
 renderCard ($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
 Render card. More...
 
 insertPageEmbeddedBlocks ($a_output_html)
 Insert blocks into container page. More...
 
 getSingleTypeBlockAsynch ($type)
 Render single block. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 getIntroduction ()
 Get introduction. More...
 
 getItemGroupsHTML ($a_pos=0)
 Get item groups HTML. More...
 
 renderItemGroup ($a_itgr)
 Render item group. More...
 

Protected Member Functions

 renderSessionLimitLink ($a_previous=true)
 Show link to show/hide all previous/next sessions. More...
 
 initDetails ()
 init details More...
 
- Protected Member Functions inherited from ilContainerContentGUI
 getViewMode ()
 Get view mode. More...
 
 getDetailsLevel ($a_item_id)
 get details level More...
 
 getRightColumnHTML ()
 Get HTML for right column. More...
 
 getCenterColumnHTML ()
 Get HTML for center column. More...
 
 initRenderer ()
 Init container renderer. More...
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
 determineAdminCommands ($a_ref_id, $a_admin_com_included_in_list=false)
 determin admin commands More...
 
 getItemGUI ($item_data, $a_show_path=false)
 Get ListGUI object for item. More...
 

Protected Attributes

 $tabs
 
 $force_details = array()
 
- Protected Attributes inherited from ilContainerContentGUI
 $tpl
 
 $ctrl
 
 $user
 
 $lng
 
 $access
 
 $plugin_admin
 
 $db
 
 $rbacsystem
 
 $settings
 
 $obj_definition
 
 $details_level = self::DETAILS_DEACTIVATED
 
 $renderer
 
 $log
 
 $view_mode
 

Additional Inherited Members

- Data Fields inherited from ilContainerContentGUI
const DETAILS_DEACTIVATED = 0
 
const DETAILS_TITLE = 1
 
const DETAILS_ALL = 2
 
const VIEW_MODE_LIST = 0
 
const VIEW_MODE_TILE = 1
 
 $container_gui
 
 $container_obj
 

Detailed Description

Shows all items in one block.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilContainerSessionsContentGUI::__construct (   $container_gui_obj)

Constructor.

Definition at line 46 of file class.ilContainerSessionsContentGUI.php.

47 {
48 global $DIC;
49
50 $this->tabs = $DIC->tabs();
51 $this->user = $DIC->user();
52 $this->ctrl = $DIC->ctrl();
53 $lng = $DIC->language();
54
55 parent::__construct($container_gui_obj);
56 $this->lng = $lng;
57 $this->initDetails();
58 }
user()
Definition: user.php:4
global $DIC
Definition: saml.php:7

References $DIC, ilContainerContentGUI\$lng, initDetails(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __showMaterials()

ilContainerSessionsContentGUI::__showMaterials (   $a_tpl)

Show Materials.

Definition at line 113 of file class.ilContainerSessionsContentGUI.php.

114 {
116
117 $this->items = $this->getContainerObject()->getSubItems($this->getContainerGUI()->isActiveAdministrationPanel());
119
120 $this->initRenderer();
121
122 $output_html = $this->getContainerGUI()->getContainerPageHTML();
123
124 // get embedded blocks
125 if ($output_html != "") {
126 $output_html = $this->insertPageEmbeddedBlocks($output_html);
127 }
128
129 if (is_array($this->items["sess"]) ||
130 $this->items['sess_link']['prev']['value'] ||
131 $this->items['sess_link']['next']['value']) {
132 $this->items['sess'] = ilUtil::sortArray($this->items['sess'], 'start', 'asc', true, false);
133
134 if ($this->items['sess_link']['prev']['value']) {
135 $prefix = $this->renderSessionLimitLink(true);
136 }
137 if ($this->items['sess_link']['next']['value']) {
138 $postfix = $this->renderSessionLimitLink(false);
139 }
140
141 $this->renderer->addTypeBlock("sess", $prefix, $postfix);
142 $this->renderer->setBlockPosition("sess", 1);
143
144 $position = 1;
145
146 foreach ($this->items["sess"] as $item_data) {
147 if (!$this->renderer->hasItem($item_data["child"])) {
148 $html = $this->renderItem($item_data, $position++, true);
149 if ($html != "") {
150 $this->renderer->addItemToBlock("sess", $item_data["type"], $item_data["child"], $html);
151 }
152 }
153 }
154 }
155
156 $pos = $this->getItemGroupsHTML(1);
157
158 if (is_array($this->items["_all"])) {
159 $this->renderer->addCustomBlock("_all", $lng->txt("content"));
160 $this->renderer->setBlockPosition("_all", ++$pos);
161
162 $position = 1;
163
164 foreach ($this->items["_all"] as $item_data) {
165 // #14599
166 if ($item_data["type"] == "sess" || $item_data["type"] == "itgr") {
167 continue;
168 }
169
170 if (!$this->renderer->hasItem($item_data["child"])) {
171 $html = $this->renderItem($item_data, $position++, true);
172 if ($html != "") {
173 $this->renderer->addItemToBlock("_all", $item_data["type"], $item_data["child"], $html);
174 }
175 }
176 }
177 }
178
179 $output_html .= $this->renderer->getHTML();
180
181 $a_tpl->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
182 }
initRenderer()
Init container renderer.
getContainerObject()
Get container object.
getContainerGUI()
Get container GUI object.
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
getItemGroupsHTML($a_pos=0)
Get item groups HTML.
clearAdminCommandsDetermination()
cleaer administration commands determination
renderSessionLimitLink($a_previous=true)
Show link to show/hide all previous/next sessions.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
$html
Definition: example_001.php:87

References $html, ilContainerContentGUI\$lng, ilContainerContentGUI\clearAdminCommandsDetermination(), ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), ilContainerContentGUI\getItemGroupsHTML(), ilContainerContentGUI\initRenderer(), ilContainerContentGUI\insertPageEmbeddedBlocks(), ilContainerContentGUI\renderItem(), renderSessionLimitLink(), and ilUtil\sortArray().

Referenced by getMainContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addFooterRow()

ilContainerSessionsContentGUI::addFooterRow (   $tpl)

add footer row

@access public

Parameters

return

Definition at line 247 of file class.ilContainerSessionsContentGUI.php.

248 {
250
251 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
252
253 $tpl->setCurrentBlock('container_details_row');
254 $tpl->setVariable('TXT_DETAILS', $this->lng->txt('details'));
255 $tpl->parseCurrentBlock();
256 }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

References $_GET, ilContainerContentGUI\$ctrl, $ilCtrl, and ilContainerContentGUI\$tpl.

◆ getDetailsLevel()

ilContainerSessionsContentGUI::getDetailsLevel (   $a_session_id)

get details level

@access public

Parameters
int$a_session_id
Returns
int DEATAILS_LEVEL

Reimplemented from ilContainerContentGUI.

Definition at line 68 of file class.ilContainerSessionsContentGUI.php.

69 {
70 if ($this->getContainerGUI()->isActiveAdministrationPanel()) {
72 }
73 if (isset($_SESSION['sess']['expanded'][$a_session_id])) {
74 return $_SESSION['sess']['expanded'][$a_session_id];
75 }
76 if (in_array($a_session_id, $this->force_details)) {
77 return self::DETAILS_ALL;
78 } else {
80 }
81 }
$_SESSION["AccountId"]

References $_SESSION, ilContainerContentGUI\DETAILS_ALL, ilContainerContentGUI\DETAILS_DEACTIVATED, ilContainerContentGUI\DETAILS_TITLE, and ilContainerContentGUI\getContainerGUI().

+ Here is the call graph for this function:

◆ getMainContent()

ilContainerSessionsContentGUI::getMainContent ( )

Get content HTML for main column.

Reimplemented from ilContainerContentGUI.

Definition at line 87 of file class.ilContainerSessionsContentGUI.php.

88 {
90 $ilTabs = $this->tabs;
91
92 // see bug #7452
93 // $ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
94
95
96 include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
97
98 $tpl = new ilTemplate(
99 "tpl.container_page.html",
100 true,
101 true,
102 "Services/Container"
103 );
104
105 $this->__showMaterials($tpl);
106
107 return $tpl->get();
108 }
special template class to simplify handling of ITX/PEAR

References ilContainerContentGUI\$lng, $tabs, ilContainerContentGUI\$tpl, and __showMaterials().

+ Here is the call graph for this function:

◆ initDetails()

ilContainerSessionsContentGUI::initDetails ( )
protected

init details

@access protected

Parameters

return

Definition at line 265 of file class.ilContainerSessionsContentGUI.php.

266 {
268
269 if ($_GET['expand']) {
270 if ($_GET['expand'] > 0) {
271 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_ALL;
272 } else {
273 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_TITLE;
274 }
275 }
276
277 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
279 $this->force_details = $session;
281 $this->force_details = array($session);
282 }
283 }
static lookupLastSessionByCourse($a_ref_id)
@access public
static lookupNextSessionByCourse($a_ref_id)
@access public
$session
$ilUser
Definition: imgupload.php:18

References $_GET, $_SESSION, $ilUser, $session, ilContainerContentGUI\$user, ilContainerContentGUI\DETAILS_ALL, ilContainerContentGUI\DETAILS_TITLE, ilContainerContentGUI\getContainerObject(), ilSessionAppointment\lookupLastSessionByCourse(), and ilSessionAppointment\lookupNextSessionByCourse().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderSessionLimitLink()

ilContainerSessionsContentGUI::renderSessionLimitLink (   $a_previous = true)
protected

Show link to show/hide all previous/next sessions.

Returns
string

Definition at line 188 of file class.ilContainerSessionsContentGUI.php.

189 {
193
194 $lng->loadLanguageModule('crs');
195
196 $tpl = new ilTemplate(
197 'tpl.container_list_item.html',
198 true,
199 true,
200 "Services/Container"
201 );
202 $tpl->setVariable('DIV_CLASS', 'ilContainerListItemOuter');
203 $tpl->setCurrentBlock('item_title_linked');
204
205 if ($a_previous) {
206 $prefp = $ilUser->getPref('crs_sess_show_prev_' . $this->getContainerObject()->getId());
207
208 if ($prefp) {
209 $tpl->setVariable('TXT_TITLE_LINKED', $lng->txt('crs_link_hide_prev_sessions'));
210 $ilCtrl->setParameterByClass(get_class($this->getContainerGUI()), 'crs_prev_sess', (int) !$prefp);
211 $tpl->setVariable('HREF_TITLE_LINKED', $ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
212 $ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
213 } else {
214 $tpl->setVariable('TXT_TITLE_LINKED', $lng->txt('crs_link_show_all_prev_sessions'));
215 $ilCtrl->setParameterByClass(get_class($this->getContainerGUI()), 'crs_prev_sess', (int) !$prefp);
216 $tpl->setVariable('HREF_TITLE_LINKED', $ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
217 $ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
218 }
219 } else {
220 $prefn = $ilUser->getPref('crs_sess_show_next_' . $this->getContainerObject()->getId());
221
222 if ($prefn) {
223 $tpl->setVariable('TXT_TITLE_LINKED', $lng->txt('crs_link_hide_next_sessions'));
224 $ilCtrl->setParameterByClass(get_class($this->getContainerGUI()), 'crs_next_sess', (int) !$prefn);
225 $tpl->setVariable('HREF_TITLE_LINKED', $ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
226 $ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
227 } else {
228 $tpl->setVariable('TXT_TITLE_LINKED', $lng->txt('crs_link_show_all_next_sessions'));
229 $ilCtrl->setParameterByClass(get_class($this->getContainerGUI()), 'crs_next_sess', (int) !$prefn);
230 $tpl->setVariable('HREF_TITLE_LINKED', $ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
231 $ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
232 }
233 }
234 $tpl->parseCurrentBlock();
235
236 return $tpl->get();
237 }

References ilContainerContentGUI\$ctrl, $ilCtrl, $ilUser, ilContainerContentGUI\$lng, ilContainerContentGUI\$tpl, ilContainerContentGUI\$user, ilContainerContentGUI\getContainerGUI(), and ilContainerContentGUI\getContainerObject().

Referenced by __showMaterials().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $force_details

ilContainerSessionsContentGUI::$force_details = array()
protected

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

◆ $tabs

ilContainerSessionsContentGUI::$tabs
protected

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

Referenced by getMainContent().


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