ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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

 $force_details
 
- Protected Attributes inherited from ilContainerContentGUI
 $details_level = self::DETAILS_DEACTIVATED
 
 $renderer
 

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 41 of file class.ilContainerByTypeContentGUI.php.

42 {
43 parent::__construct($container_gui_obj);
44 $this->initDetails();
45 }

References initDetails().

+ 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 54 of file class.ilContainerByTypeContentGUI.php.

55 {
56 if($this->getContainerGUI()->isActiveAdministrationPanel())
57 {
59 }
60 if(isset($_SESSION['sess']['expanded'][$a_session_id]))
61 {
62 return $_SESSION['sess']['expanded'][$a_session_id];
63 }
64 if($a_session_id == $this->force_details)
65 {
66 return self::DETAILS_ALL;
67 }
68 else
69 {
71 }
72 }
$_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 78 of file class.ilContainerByTypeContentGUI.php.

79 {
80 global $ilBench, $ilAccess;
81
82 $tpl = new ilTemplate("tpl.container_page.html", true, true,
83 "Services/Container");
84
85 // get all sub items
86 $ilBench->start("ilContainerGUI", "0100_getSubItems");
87 $this->items = $this->getContainerObject()->getSubItems(
88 $this->getContainerGUI()->isActiveAdministrationPanel());
89 $ilBench->stop("ilContainerGUI", "0100_getSubItems");
90
91 // Show introduction, if repository is empty
92 // @todo: maybe we move this
93 if (count($this->items) == 0 &&
94 $this->getContainerObject()->getRefId() == ROOT_FOLDER_ID &&
95 $ilAccess->checkAccess("write", "", $this->getContainerObject()->getRefId()))
96 {
97 $html = $this->getIntroduction();
98 $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
99 }
100 else // show item list otherwise
101 {
102 $html = $this->renderItemList();
103 $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
104 }
105
106 return $tpl->get();
107 }
global $tpl
Definition: ilias.php:8
getContainerObject()
Get container object.
special template class to simplify handling of ITX/PEAR
$html
Definition: example_001.php:87
global $ilBench
Definition: ilias.php:18

References $html, $ilBench, $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 170 of file class.ilContainerByTypeContentGUI.php.

171 {
172 global $ilUser;
173
174 if($_GET['expand'])
175 {
176 if($_GET['expand'] > 0)
177 {
178 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_ALL;
179 }
180 else
181 {
182 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_TITLE;
183 }
184 }
185
186
187 if($this->getContainerObject()->getType() == 'crs')
188 {
189 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
191 {
192 $this->force_details = $session;
193 }
194 elseif($session = ilSessionAppointment::lookupLastSessionByCourse($this->getContainerObject()->getRefId()))
195 {
196 $this->force_details = $session;
197 }
198 }
199 }
$_GET["client_id"]
static lookupLastSessionByCourse($a_ref_id)
@access public
static lookupNextSessionByCourse($a_ref_id)
@access public
global $ilUser
Definition: imgupload.php:15

References $_GET, $_SESSION, $ilUser, 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 112 of file class.ilContainerByTypeContentGUI.php.

113 {
114 include_once("Services/Object/classes/class.ilObjectListGUIFactory.php");
115
117
118 $this->initRenderer();
119
120 // text/media page content
121 $output_html = $this->getContainerGUI()->getContainerPageHTML();
122
123 // get embedded blocks
124 if ($output_html != "")
125 {
126 $output_html = $this->insertPageEmbeddedBlocks($output_html);
127 }
128
129 // item groups
130 $pos = $this->getItemGroupsHTML();
131
132 // iterate all types
133 foreach ($this->getGroupedObjTypes() as $type => $v)
134 {
135 if(is_array($this->items[$type]) &&
136 $this->renderer->addTypeBlock($type))
137 {
138 $this->renderer->setBlockPosition($type, ++$pos);
139
140 $position = 1;
141
142 foreach($this->items[$type] as $item_data)
143 {
144 $item_ref_id = $item_data["child"];
145
146 if(!$this->renderer->hasItem($item_ref_id))
147 {
148 $html = $this->renderItem($item_data, $position++);
149 if ($html != "")
150 {
151 $this->renderer->addItemToBlock($type, $item_data["type"], $item_ref_id, $html);
152 }
153 }
154 }
155 }
156 }
157
158 $output_html .= $this->renderer->getHTML();
159
160 return $output_html;
161 }
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

References $html, 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

◆ $force_details

ilContainerByTypeContentGUI::$force_details
protected

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


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