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

Shows all items grouped by type. More...

+ Inheritance diagram for ilContainerByTypeContentGUI:
+ Collaboration diagram for ilContainerByTypeContentGUI:

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...
 
 renderItemList ()
 Render Items. 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...
 
 insertPageEmbeddedBlocks ($a_output_html)
 Insert blocks into container page. 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

 initDetails ()
 init details More...
 
- Protected Member Functions inherited from ilContainerContentGUI
 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

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

Additional Inherited Members

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

Detailed Description

Shows all items grouped by type.

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.ilContainerByTypeContentGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilContainerByTypeContentGUI::__construct (   $container_gui_obj)

Constructor.

Definition at line 51 of file class.ilContainerByTypeContentGUI.php.

52 {
53 global $DIC;
54
55 $this->access = $DIC->access();
56 $this->user = $DIC->user();
57 parent::__construct($container_gui_obj);
58 $this->initDetails();
59 }
user()
Definition: user.php:4
global $DIC
Definition: saml.php:7

References $DIC, initDetails(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDetailsLevel()

ilContainerByTypeContentGUI::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.ilContainerByTypeContentGUI.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 ($a_session_id == $this->force_details) {
77 return self::DETAILS_ALL;
78 } else {
80 }
81 }
$_SESSION["AccountId"]
getContainerGUI()
Get container GUI object.

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

+ Here is the call graph for this function:

◆ getMainContent()

ilContainerByTypeContentGUI::getMainContent ( )

Get content HTML for main column.

Reimplemented from ilContainerContentGUI.

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

88 {
89 $ilAccess = $this->access;
90
91 $tpl = new ilTemplate(
92 "tpl.container_page.html",
93 true,
94 true,
95 "Services/Container"
96 );
97
98 // get all sub items
99 $this->items = $this->getContainerObject()->getSubItems(
100 $this->getContainerGUI()->isActiveAdministrationPanel()
101 );
102
103 // Show introduction, if repository is empty
104 // @todo: maybe we move this
105 if ((!is_array($this->items) || count($this->items) == 0) &&
106 $this->getContainerObject()->getRefId() == ROOT_FOLDER_ID &&
107 $ilAccess->checkAccess("write", "", $this->getContainerObject()->getRefId())) {
108 $html = $this->getIntroduction();
109 $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
110 } else { // show item list otherwise
111 $html = $this->renderItemList();
112 $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
113 }
114
115 return $tpl->get();
116 }
getContainerObject()
Get container object.
special template class to simplify handling of ITX/PEAR
$html
Definition: example_001.php:87

References $access, $html, ilContainerContentGUI\$tpl, ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), ilContainerContentGUI\getIntroduction(), and renderItemList().

+ Here is the call graph for this function:

◆ initDetails()

ilContainerByTypeContentGUI::initDetails ( )
protected

init details

@access protected

Parameters

return

Definition at line 173 of file class.ilContainerByTypeContentGUI.php.

174 {
176
177 if ($_GET['expand']) {
178 if ($_GET['expand'] > 0) {
179 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_ALL;
180 } else {
181 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_TITLE;
182 }
183 }
184
185
186 if ($this->getContainerObject()->getType() == 'crs') {
187 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
189 $this->force_details = $session;
191 $this->force_details = $session;
192 }
193 }
194 }
$_GET["client_id"]
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, $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:

◆ renderItemList()

ilContainerByTypeContentGUI::renderItemList ( )

Render Items.

Definition at line 121 of file class.ilContainerByTypeContentGUI.php.

122 {
123 include_once("Services/Object/classes/class.ilObjectListGUIFactory.php");
124
126
127 $this->initRenderer();
128
129 // text/media page content
130 $output_html = $this->getContainerGUI()->getContainerPageHTML();
131
132 // get embedded blocks
133 if ($output_html != "") {
134 $output_html = $this->insertPageEmbeddedBlocks($output_html);
135 }
136
137 // item groups
138 $pos = $this->getItemGroupsHTML();
139
140 // iterate all types
141 foreach ($this->getGroupedObjTypes() as $type => $v) {
142 if (is_array($this->items[$type]) &&
143 $this->renderer->addTypeBlock($type)) {
144 $this->renderer->setBlockPosition($type, ++$pos);
145
146 $position = 1;
147
148 foreach ($this->items[$type] as $item_data) {
149 $item_ref_id = $item_data["child"];
150
151 if (!$this->renderer->hasItem($item_ref_id)) {
152 $html = $this->renderItem($item_data, $position++);
153 if ($html != "") {
154 $this->renderer->addItemToBlock($type, $item_data["type"], $item_ref_id, $html);
155 }
156 }
157 }
158 }
159 }
160
161 $output_html .= $this->renderer->getHTML();
162
163 return $output_html;
164 }
initRenderer()
Init container renderer.
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
getGroupedObjTypes()
Get grouped repository object types.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
getItemGroupsHTML($a_pos=0)
Get item groups HTML.
clearAdminCommandsDetermination()
cleaer administration commands determination
$type

References $html, $type, ilContainerContentGUI\clearAdminCommandsDetermination(), ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getGroupedObjTypes(), ilContainerContentGUI\getItemGroupsHTML(), ilContainerContentGUI\initRenderer(), ilContainerContentGUI\insertPageEmbeddedBlocks(), and ilContainerContentGUI\renderItem().

Referenced by getMainContent().

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

Field Documentation

◆ $access

ilContainerByTypeContentGUI::$access
protected

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

Referenced by getMainContent().

◆ $force_details

ilContainerByTypeContentGUI::$force_details
protected

Definition at line 45 of file class.ilContainerByTypeContentGUI.php.

◆ $user

ilContainerByTypeContentGUI::$user
protected

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

Referenced by initDetails().


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