ILIAS  release_7 Revision v7.30-3-g800a261c036
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, \ilContainerUserFilter $container_user_filter=null)
 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...
 
 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

 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...
 
 hasForcedOrderByStartDate (string $type)
 

Protected Attributes

 $access
 
 $user
 
 $force_details
 
 $block_limit
 
 $container_user_filter
 
- 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 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,
\ilContainerUserFilter  $container_user_filter = null 
)

Constructor.

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

59 {
60 global $DIC;
61
62 $this->access = $DIC->access();
63 $this->user = $DIC->user();
64 parent::__construct($container_gui_obj);
65 $this->initDetails();
66 $this->block_limit = (int) ilContainer::_lookupContainerSetting($container_gui_obj->object->getId(), "block_limit");
67 $this->container_user_filter = $container_user_filter;
68 }
user()
Definition: user.php:4
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $container_user_filter, $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilContainer\_lookupContainerSetting(), 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 77 of file class.ilContainerByTypeContentGUI.php.

78 {
79 if ($this->getContainerGUI()->isActiveAdministrationPanel()) {
81 }
82 if (isset($_SESSION['sess']['expanded'][$a_session_id])) {
83 return $_SESSION['sess']['expanded'][$a_session_id];
84 }
85 if ($a_session_id == $this->force_details) {
86 return self::DETAILS_ALL;
87 } else {
89 }
90 }
$_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 96 of file class.ilContainerByTypeContentGUI.php.

97 {
98 $ilAccess = $this->access;
99
100 $tpl = new ilTemplate(
101 "tpl.container_page.html",
102 true,
103 true,
104 "Services/Container"
105 );
106
107 // get all sub items
108 $this->items = $this->getContainerObject()->getSubItems(
109 $this->getContainerGUI()->isActiveAdministrationPanel(),
110 false,
111 0,
112 $this->container_user_filter
113 );
114
115 //$this->items = $this->applyFilterToItems($this->items);
116
117 // Show introduction, if repository is empty
118 // @todo: maybe we move this
119 if ((!is_array($this->items) || count($this->items) == 0) &&
120 $this->getContainerObject()->getRefId() == ROOT_FOLDER_ID &&
121 $ilAccess->checkAccess("write", "", $this->getContainerObject()->getRefId())) {
122 $html = $this->getIntroduction();
123 $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
124 } else { // show item list otherwise
125 $html = $this->renderItemList();
126 $tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
127 }
128
129 return $tpl->get();
130 }
getContainerObject()
Get container object.
special template class to simplify handling of ITX/PEAR
const ROOT_FOLDER_ID
Definition: constants.php:30

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

+ Here is the call graph for this function:

◆ initDetails()

ilContainerByTypeContentGUI::initDetails ( )
protected

init details

@access protected

Parameters

return

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

196 {
198
199 if ($_GET['expand']) {
200 if ($_GET['expand'] > 0) {
201 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_ALL;
202 } else {
203 $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_TITLE;
204 }
205 }
206
207
208 if ($this->getContainerObject()->getType() == 'crs') {
209 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
211 $this->force_details = $session;
213 $this->force_details = $session;
214 }
215 }
216 }
$_GET["client_id"]
static lookupLastSessionByCourse($a_ref_id)
@access public
static lookupNextSessionByCourse($a_ref_id)
@access public
$ilUser
Definition: imgupload.php:18
$session

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

136 {
137 include_once("Services/Object/classes/class.ilObjectListGUIFactory.php");
138
140
141 $this->initRenderer();
142
143 // text/media page content
144 $output_html = $this->getContainerGUI()->getContainerPageHTML();
145
146 // get embedded blocks
147 if ($output_html != "") {
148 $output_html = $this->insertPageEmbeddedBlocks($output_html);
149 }
150
151 // item groups
152 $pos = $this->getItemGroupsHTML();
153
154 // iterate all types
155 foreach ($this->getGroupedObjTypes() as $type => $v) {
156 if (is_array($this->items[$type]) &&
157 $this->renderer->addTypeBlock($type)) {
158 $this->renderer->setBlockPosition($type, ++$pos);
159
160 $position = 1;
161
162 foreach ($this->items[$type] as $item_data) {
163 $item_ref_id = $item_data["child"];
164 if ($this->block_limit > 0 && !$this->getContainerGUI()->isActiveItemOrdering() && $position == $this->block_limit + 1) {
165 if ($position == $this->block_limit + 1) {
166 // render more button
167 $this->renderer->addShowMoreButton($type);
168 }
169 continue;
170 }
171
172 if (!$this->renderer->hasItem($item_ref_id)) {
173 $html = $this->renderItem($item_data, $position);
174 if ($html != "") {
175 $position++;
176 $this->renderer->addItemToBlock($type, $item_data["type"], $item_ref_id, $html);
177 }
178 }
179 }
180 }
181 }
182
183 $output_html .= $this->renderer->getHTML();
184
185 return $output_html;
186 }
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 $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().

◆ $block_limit

ilContainerByTypeContentGUI::$block_limit
protected

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

◆ $container_user_filter

ilContainerByTypeContentGUI::$container_user_filter
protected

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

Referenced by __construct().

◆ $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: