ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContainerSimpleContentGUI Class Reference

Shows all items in one block. More...

+ Inheritance diagram for ilContainerSimpleContentGUI:
+ Collaboration diagram for ilContainerSimpleContentGUI:

Public Member Functions

 __construct ($container_gui_obj)
 Constructor. More...
 
 getMainContent ()
 Get content HTML for main column. More...
 
 __showMaterials ($a_tpl)
 Show Materials. More...
 
 getDetailsLevel ($a_session_id)
 get details level 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...
 
 newBlockTemplate ()
 returns a new list block template More...
 
 addStandardRow (&$a_tpl, $a_html, $a_ref_id=0)
 add item row to template More...
 
 addHeaderRow ($a_tpl, $a_type="", $a_text="")
 Add header row to block template. More...
 
 resetRowType ()
 Reset row type (toggling background colors) More...
 
 insertPageEmbeddedBlocks ($a_output_html)
 Insert blocks into container page. More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 addSeparatorRow (&$a_tpl)
 Add separator row between two blocks. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 getIntroduction ()
 Get introduction. More...
 
 getItemGroupsHTML ($a_tpl)
 Get item groups HTML. More...
 
 renderItemGroup ($a_tpl, $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...
 
 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
 

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

Constructor & Destructor Documentation

◆ __construct()

ilContainerSimpleContentGUI::__construct (   $container_gui_obj)

Constructor.

Definition at line 41 of file class.ilContainerSimpleContentGUI.php.

References initDetails().

42  {
43  parent::__construct($container_gui_obj);
44  $this->initDetails();
45  }
+ Here is the call graph for this function:

Member Function Documentation

◆ __showMaterials()

ilContainerSimpleContentGUI::__showMaterials (   $a_tpl)

Show Materials.

Definition at line 75 of file class.ilContainerSimpleContentGUI.php.

References $lng, $tpl, ilContainerContentGUI\addHeaderRow(), ilContainerContentGUI\addStandardRow(), ilContainerContentGUI\clearAdminCommandsDetermination(), ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), ilContainerContentGUI\getItemGroupsHTML(), ilContainerContentGUI\insertPageEmbeddedBlocks(), ilContainerContentGUI\newBlockTemplate(), and ilContainerContentGUI\renderItem().

Referenced by getMainContent().

76  {
77  global $ilAccess, $lng;
78 
79  $this->items = $this->getContainerObject()->getSubItems($this->getContainerGUI()->isActiveAdministrationPanel());
81 
82  $output_html = $this->getContainerGUI()->getContainerPageHTML();
83 
84  // get embedded blocks
85  if ($output_html != "")
86  {
87  $output_html = $this->insertPageEmbeddedBlocks($output_html);
88  }
89 
90  $tpl = $this->newBlockTemplate();
91 
92  // item groups
93  $this->getItemGroupsHTML($tpl);
94 
95  if (is_array($this->items["_all"]))
96  {
97  // all rows
98  $item_html = array();
99  $position = 1;
100  foreach($this->items["_all"] as $k => $item_data)
101  {
102  if ($this->rendered_items[$item_data["child"]] !== true)
103  {
104  if ($item_data["type"] == "itgr")
105  {
106  continue;
107  }
108 
109  $html = $this->renderItem($item_data,$position++,true);
110  if ($html != "")
111  {
112  $item_html[] = $html;
113  }
114  }
115  }
116 
117  // if we have at least one item, output the block
118  if (count($item_html) > 0)
119  {
120  $this->addHeaderRow($tpl, "", $lng->txt("content"));
121  foreach($item_html as $h)
122  {
123  $this->addStandardRow($tpl, $h);
124  }
125  }
126  }
127 
128  $output_html .= $tpl->get();
129  $a_tpl->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
130  }
newBlockTemplate()
returns a new list block template
addHeaderRow($a_tpl, $a_type="", $a_text="")
Add header row to block template.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
getItemGroupsHTML($a_tpl)
Get item groups HTML.
addStandardRow(&$a_tpl, $a_html, $a_ref_id=0)
add item row to template
getContainerGUI()
Get container GUI object.
getContainerObject()
Get container object.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
clearAdminCommandsDetermination()
cleaer administration commands determination
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDetailsLevel()

ilContainerSimpleContentGUI::getDetailsLevel (   $a_session_id)

get details level

public

Parameters
int$a_session_id
Returns
int DEATAILS_LEVEL

Definition at line 177 of file class.ilContainerSimpleContentGUI.php.

References $_SESSION, and ilContainerContentGUI\getContainerGUI().

178  {
179  if($this->getContainerGUI()->isActiveAdministrationPanel())
180  {
181  return self::DETAILS_DEACTIVATED;
182  }
183  if(isset($_SESSION['sess']['expanded'][$a_session_id]))
184  {
185  return $_SESSION['sess']['expanded'][$a_session_id];
186  }
187  if($a_session_id == $this->force_details)
188  {
189  return self::DETAILS_ALL;
190  }
191  else
192  {
193  return self::DETAILS_TITLE;
194  }
195  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
getContainerGUI()
Get container GUI object.
+ Here is the call graph for this function:

◆ getMainContent()

ilContainerSimpleContentGUI::getMainContent ( )

Get content HTML for main column.

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

References $lng, $tpl, and __showMaterials().

52  {
53  global $lng,$ilTabs;
54 
55  // see bug #7452
56 // $ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
57 
58  include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
59 
60  $tpl = new ilTemplate("tpl.container_page.html", true, true,
61  "Services/Container");
62 
63  // Feedback
64  // @todo
65 // $this->__showFeedBack();
66 
67  $this->__showMaterials($tpl);
68 
69  return $tpl->get();
70  }
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ initDetails()

ilContainerSimpleContentGUI::initDetails ( )
protected

init details

protected

Parameters

Definition at line 139 of file class.ilContainerSimpleContentGUI.php.

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

Referenced by __construct().

140  {
141  global $ilUser;
142 
143  if($_GET['expand'])
144  {
145  if($_GET['expand'] > 0)
146  {
147  $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_ALL;
148  }
149  else
150  {
151  $_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_TITLE;
152  }
153  }
154 
155 
156  if($this->getContainerObject()->getType() == 'crs')
157  {
158  include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
159  if($session = ilSessionAppointment::lookupNextSessionByCourse($this->getContainerObject()->getRefId()))
160  {
161  $this->force_details = $session;
162  }
163  elseif($session = ilSessionAppointment::lookupLastSessionByCourse($this->getContainerObject()->getRefId()))
164  {
165  $this->force_details = $session;
166  }
167  }
168  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
getContainerObject()
Get container object.
static lookupLastSessionByCourse($a_ref_id)
public
global $ilUser
Definition: imgupload.php:15
static lookupNextSessionByCourse($a_ref_id)
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $force_details

ilContainerSimpleContentGUI::$force_details
protected

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


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