ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPDSelectedItemsBlockGUI Class Reference

BlockGUI class for Selected Items on Personal Desktop. More...

+ Inheritance diagram for ilPDSelectedItemsBlockGUI:
+ Collaboration diagram for ilPDSelectedItemsBlockGUI:

Public Member Functions

 ilPDSelectedItemsBlockGUI ()
 Constructor.
 addToDeskObject ()
 removeFromDeskObject ()
 changeView ()
 Method to switch between the different views of personal items block.
 getHTML ()
 Get HTML.
executeCommand ()
 execute command
 getContent ()
 setContent ($a_content)
 fillDataSection ()
 Fill data section.
 fillFooter ()
 block footer
 setFooterLinks ()
 Set footer links.
 getMembershipItemsPerLocation ($tpl)
 Generates the block html string by location ordering.
 getMembershipItemsPerType ($tpl)
 Generates the block html string by type ordering.
 getMembershipItemsBlockHTML ()
 Gateway method to distinguish between sorting type.
 getSelectedItemsBlockHTML ()
 get selected item block
 getSelectedItemsPerType (&$tpl)
 get selected items per type
 getSelectedItemsPerLocation (&$tpl)
 get selected items per type
 resetRowType ()
newBlockTemplate ()
 returns a new list block template
getItemListGUI ($a_type)
 get item list gui class for type
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template
 addParentRow (&$a_tpl, $a_ref_id, $a_show_image=true)
 adds a header row to a block template
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="", $a_related_header="")
 adds a standard row to a block template
 getIntroduction ()
 Get overview.
 orderPDItemsByLocation ()
 order desktop items by location
 orderPDItemsByType ()
 order desktop items by Type
- Public Member Functions inherited from ilBlockGUI
 ilBlockGUI ()
 Constructor.
 addHeaderLink ($a_href, $a_text, $status=true)
 getHeaderLinks ()
 setData ($a_data)
 Set Data.
 getData ()
 Get Data.
 setBigMode ($a_bigmode)
 Set Big Mode.
 getBigMode ()
 Get Big Mode.
 setBlockId ($a_block_id=0)
 Set Block Id.
 getBlockId ()
 Get Block Id.
 setAvailableDetailLevels ($a_max, $a_min=0)
 Set Available Detail Levels.
 setCurrentDetailLevel ($a_currentdetaillevel)
 Set Current Detail Level.
 setGuiObject (&$a_gui_object)
 Set GuiObject.
 getGuiObject ()
 Get GuiObject.
 getCurrentDetailLevel ()
 Get Current Detail Level.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setImage ($a_image)
 Set Image.
 getImage ()
 Get Image.
 setOffset ($a_offset)
 Set Offset.
 getOffset ()
 Get Offset.
 correctOffset ()
 setLimit ($a_limit)
 Set Limit.
 getLimit ()
 Get Limit.
 setEnableEdit ($a_enableedit)
 Set EnableEdit.
 getEnableEdit ()
 Get EnableEdit.
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode.
 getRepositoryMode ()
 Get RepositoryMode.
 setFooterInfo ($a_footerinfo, $a_hide_and_icon=false)
 Set Footer Info.
 getFooterInfo ($a_hide_and_icon=false)
 Get Footer Info.
 setSubtitle ($a_subtitle)
 Set Subtitle.
 getSubtitle ()
 Get Subtitle.
 setRefId ($a_refid)
 Set Ref Id (only used if isRepositoryObject() is true).
 getRefId ()
 Get Ref Id (only used if isRepositoryObject() is true).
 setAdminCommands ($a_admincommands)
 Set Administration Commmands.
 getAdminCommands ()
 Get Administration Commmands.
 setColSpan ($a_colspan)
 Set Columns Span.
 getColSpan ()
 Get Columns Span.
 setEnableDetailRow ($a_enabledetailrow)
 Set EnableDetailRow.
 getEnableDetailRow ()
 Get EnableDetailRow.
 setEnableNumInfo ($a_enablenuminfo)
 Set Enable Item Number Info.
 getEnableNumInfo ()
 Get Enable Item Number Info.
 setProperties ($a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties.
 getProperty ($a_property)
 setProperty ($a_property, $a_value)
 setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="")
 Set Row Template Name.
 getNavParameter ()
 getDetailParameter ()
 getConfigParameter ()
 getMoveParameter ()
 getRowTemplateName ()
 Get Row Template Name.
 getRowTemplateDir ()
 Get Row Template Directory.
 addBlockCommand ($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false)
 Add Block Command.
 getBlockCommands ()
 Get Block commands.
 addHeaderCommand ($a_href, $a_text, $a_as_close=false)
 Add Header Block Command.
 getHeaderCommands ()
 Get Header Block commands.
 addFooterLink ($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false)
 Add a footer text/link.
 getFooterLinks ()
 Get footer links.
 clearFooterLinks ()
 Clear footer links.
 handleDetailLevel ()
 Handle read/write current detail level.
 setConfigMode ($a_configmode)
 Handle config status.
 getConfigMode ()
 Get Config Mode (move blocks).
 fillHeaderCommands ()
 Fill header commands block.
 fillHeaderTitleBlock ()
 Fill header title block (title and.
 setDataSection ($a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used.
 fillRow ($a_set)
 fillPreviousNext ()
 Fill previous/next row.
 setPreviousNextLinks ()
 Get previous/next linkbar.
 fillFooterLinks ($a_top=false, $a_numinfo="")
 Fill footer links.
 fillDetailRow ()
 Fill Detail Setting Row.
 fillMoveRow ()
 Fill row for Moving.
 getAllowMove ($a_direction)
 setAllowMove ($a_direction, $a_allow=true)
 fillMoveLink ($a_value, $a_img, $a_txt)

Static Public Member Functions

static getBlockType ()
 Get block type.
static isRepositoryObject ()
 Get block type.
- Static Public Member Functions inherited from ilBlockGUI
static getScreenMode ()
 Get Screen Mode for current command.

Data Fields

const VIEW_MY_OFFERS = 0
const VIEW_MY_MEMBERSHIPS = 1

Static Public Attributes

static $block_type = "pditems"

Protected Member Functions

 determineViewSettings ()
 Sets the current view of the user and determines which views are allowed.
 getObjectsByMembership ($types=array())
 Gets all objects the current user is member of.
- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")

Private Attributes

 $view = self::VIEW_MY_OFFERS
 $allowed_views = array()

Additional Inherited Members

- Protected Attributes inherited from ilBlockGUI
 $data = array()
 $colspan = 1
 $enablenuminfo = true
 $detail_min = 0
 $detail_max = 0
 $bigmode = false
 $footer_links = array()
 $block_id = 0
 $header_commands = array()
 $allow_moving = true
 $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 $enabledetailrow = true
 $header_links = array()
 $footerinfo = false
 $footerinfo_icon = false
 $block_commands = array()
 $max_count = false
 $close_command = false
 $image = false
 $property = false
 $nav_value = ""
 $css_row = ""

Detailed Description

BlockGUI class for Selected Items on Personal Desktop.

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

ilPDSelectedItemsBlockGUI: ilColumnGUI

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

Member Function Documentation

ilPDSelectedItemsBlockGUI::addHeaderRow ( $a_tpl,
  $a_type,
  $a_show_image = true 
)

adds a header row to a block template

Parameters
object$a_tplblock template
string$a_typeobject type private

Definition at line 1052 of file class.ilPDSelectedItemsBlockGUI.php.

References $title, ilUtil\getImagePath(), and ilPlugin\lookupTxt().

Referenced by getMembershipItemsPerType(), and getSelectedItemsPerType().

{
global $objDefinition;
$icon = ilUtil::getImagePath("icon_".$a_type.".gif");
if (!$objDefinition->isPlugin($a_type))
{
$title = $this->lng->txt("objs_".$a_type);
}
else
{
include_once("./Services/Component/classes/class.ilPlugin.php");
ilPlugin::lookupTxt("rep_robj", $a_type, "objs_".$a_type);
}
$header_id = "th_".$a_type;
if ($a_show_image)
{
$a_tpl->setCurrentBlock("container_header_row_image");
$a_tpl->setVariable("HEADER_IMG", $icon);
$a_tpl->setVariable("HEADER_ALT", $title);
}
else
{
$a_tpl->setCurrentBlock("container_header_row");
}
$a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
$a_tpl->setVariable("BLOCK_HEADER_ID", $header_id);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::addParentRow ( $a_tpl,
  $a_ref_id,
  $a_show_image = true 
)

adds a header row to a block template

Parameters
object$a_tplblock template
string$a_typeobject type private

Definition at line 1094 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilSetting, $path, $title, ilContainer\_lookupIconPath(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), and ilUtil\getImagePath().

Referenced by getMembershipItemsPerLocation(), and getSelectedItemsPerLocation().

{
global $tree, $ilSetting;
$par_id = ilObject::_lookupObjId($a_ref_id);
$type = ilObject::_lookupType($par_id);
if (!in_array($type, array("lm", "dbk", "sahs", "htlm")))
{
$icon = ilUtil::getImagePath("icon_".$type.".gif");
}
else
{
$icon = ilUtil::getImagePath("icon_lm.gif");
}
// custom icon
if ($ilSetting->get("custom_icons") &&
in_array($type, array("cat","grp","crs", "root")))
{
require_once("./Services/Container/classes/class.ilContainer.php");
if (($path = ilContainer::_lookupIconPath($par_id, "small")) != "")
{
$icon = $path;
}
}
if ($tree->getRootId() != $par_id)
{
}
else
{
$nd = $tree->getNodeData(ROOT_FOLDER_ID);
$title = $nd["title"];
if ($title == "ILIAS")
{
$title = $this->lng->txt("repository");
}
}
/*
$item_list_gui =& $this->getItemListGUI($type);
$item_list_gui->enableIcon(false);
$item_list_gui->enableDelete(false);
$item_list_gui->enableCut(false);
$item_list_gui->enablePayment(false);
$item_list_gui->enableLink(false);
$item_list_gui->enableDescription(false);
$item_list_gui->enableProperties(false);
$item_list_gui->enablePreconditions(false);
$item_list_gui->enablePath(true);
$item_list_gui->enableCommands(false);
$html = $item_list_gui->getListItemHTML($a_ref_id,
$par_id, $title, "");
if ($a_show_image)
{
$a_tpl->setCurrentBlock("container_header_row_image");
$a_tpl->setVariable("HEADER_IMG", $icon);
$a_tpl->setVariable("HEADER_ALT", $title);
}
*/
// else
// {
$a_tpl->setCurrentBlock("container_header_row");
// }
$a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
/* $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $html);
$a_tpl->setVariable("BLOCK_HEADER_ID", "th_".$a_ref_id);*/
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::addStandardRow ( $a_tpl,
  $a_html,
  $a_item_ref_id = "",
  $a_item_obj_id = "",
  $a_image_type = "",
  $a_related_header = "" 
)

adds a standard row to a block template

Parameters
object$a_tplblock template
string$a_htmlhtml code private

Definition at line 1176 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilSetting, $path, $title, ilContainer\_lookupIconPath(), and ilUtil\getImagePath().

Referenced by getMembershipItemsPerLocation(), getMembershipItemsPerType(), getSelectedItemsPerLocation(), and getSelectedItemsPerType().

{
global $ilSetting;
$this->cur_row_type = ($this->cur_row_type == "row_type_1")
? "row_type_2"
: "row_type_1";
$a_tpl->touchBlock($this->cur_row_type);
if ($a_image_type != "")
{
if (!is_array($a_image_type) && !in_array($a_image_type, array("lm", "dbk", "htlm", "sahs")))
{
$icon = ilUtil::getImagePath("icon_".$a_image_type.".gif");
$title = $this->lng->txt("obj_".$a_image_type);
}
else
{
$icon = ilUtil::getImagePath("icon_lm.gif");
$title = $this->lng->txt("learning_resource");
}
// custom icon
if ($ilSetting->get("custom_icons") &&
in_array($a_image_type, array("cat","grp","crs")))
{
require_once("./Services/Container/classes/class.ilContainer.php");
if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "")
{
$icon = $path;
}
}
$a_tpl->setCurrentBlock("block_row_image");
$a_tpl->setVariable("ROW_IMG", $icon);
$a_tpl->setVariable("ROW_ALT", $title);
$a_tpl->parseCurrentBlock();
}
else
{
$a_tpl->setVariable("ROW_NBSP", " ");
}
$a_tpl->setCurrentBlock("container_standard_row");
$a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
$rel_headers = ($a_related_header != "")
? "th_selected_items ".$a_related_header
: "th_selected_items";
$a_tpl->setVariable("BLOCK_ROW_HEADERS", $rel_headers);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::addToDeskObject ( )
See Also
ilDesktopItemHandling::addToDesk()

Implements ilDesktopItemHandling.

Definition at line 71 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, and ilDesktopItemGUI\addToDesktop().

{
global $ilCtrl;
include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
$ilCtrl->redirectByClass('ilpersonaldesktopgui', 'show');
}

+ Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::changeView ( )

Method to switch between the different views of personal items block.

public

Definition at line 98 of file class.ilPDSelectedItemsBlockGUI.php.

References $_GET, $ilCtrl, and $view.

{
global $ilUser, $ilCtrl;
if(in_array((int)$_GET['view'], $this->allowed_views))
{
$ilUser->writePref('pd_view', (int)$_GET['view']);
}
else
{
@reset($this->allowed_views);
$view = (int)@current($this->allowed_views);
$ilUser->writePref('pd_view', $view);
}
$ilCtrl->redirectByClass('ilpersonaldesktopgui', 'show');
}
ilPDSelectedItemsBlockGUI::determineViewSettings ( )
protected

Sets the current view of the user and determines which views are allowed.

protected

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

References $ilSetting, VIEW_MY_MEMBERSHIPS, and VIEW_MY_OFFERS.

Referenced by ilPDSelectedItemsBlockGUI().

{
global $ilSetting, $ilUser;
$this->allowed_views = array();
// determine view
if($ilSetting->get('disable_my_offers') == 1 &&
$ilSetting->get('disable_my_memberships') == 1)
{
// if both views are disabled set default view (should not occur but we should prevent it)
$ilSetting->set('personal_items_default_view', self::VIEW_MY_OFFERS);
$this->allowed_views[] = self::VIEW_MY_OFFERS;
}
// both views are enabled, get default view
else if($ilSetting->get('disable_my_offers') == 0 &&
$ilSetting->get('disable_my_memberships') == 0)
{
$this->allowed_views[] = self::VIEW_MY_OFFERS;
$this->allowed_views[] = self::VIEW_MY_MEMBERSHIPS;
}
else if($ilSetting->get('disable_my_offers') == 0 &&
$ilSetting->get('disable_my_memberships') == 1)
{
$this->allowed_views[] = self::VIEW_MY_OFFERS;
}
else
{
$this->allowed_views[] = self::VIEW_MY_MEMBERSHIPS;
}
$this->view = $ilUser->getPref('pd_view');
if($this->view === false || !in_array((int)$this->view, $this->allowed_views))
{
$ilUser->writePref('pd_view', (int)$ilSetting->get('personal_items_default_view'));
$this->view = (int)$ilSetting->get('personal_items_default_view');
}
}

+ Here is the caller graph for this function:

& ilPDSelectedItemsBlockGUI::executeCommand ( )

execute command

Definition at line 238 of file class.ilPDSelectedItemsBlockGUI.php.

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class = $ilCtrl->getNextClass();
$cmd = $ilCtrl->getCmd("getHTML");
if(method_exists($this, $cmd))
{
return $this->$cmd();
}
else
{
$cmd .= 'Object';
return $this->$cmd();
}
}
ilPDSelectedItemsBlockGUI::fillDataSection ( )

Fill data section.

Reimplemented from ilBlockGUI.

Definition at line 269 of file class.ilPDSelectedItemsBlockGUI.php.

References getContent(), getIntroduction(), and ilBlockGUI\setDataSection().

{
global $ilUser;
if ($this->getContent() != "")
{
$this->tpl->setVariable("BLOCK_ROW", $this->getContent());
}
else
{
$this->setDataSection($this->getIntroduction());
}
}

+ Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::fillFooter ( )

block footer

Reimplemented from ilBlockGUI.

Definition at line 287 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $lng, ilBlockGUI\fillFooterLinks(), ilBlockGUI\getColSpan(), and setFooterLinks().

{
global $ilCtrl, $lng, $ilUser;
$this->setFooterLinks();
$this->fillFooterLinks();
$this->tpl->setVariable("FCOLSPAN", $this->getColSpan());
if ($this->tpl->blockExists("block_footer"))
{
$this->tpl->setCurrentBlock("block_footer");
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

static ilPDSelectedItemsBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 165 of file class.ilPDSelectedItemsBlockGUI.php.

References $block_type.

Referenced by getHTML().

{
}

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getContent ( )

Definition at line 256 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by fillDataSection(), getHTML(), and setFooterLinks().

{
return $this->content;
}

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getHTML ( )

Get HTML.

Reimplemented from ilBlockGUI.

Definition at line 181 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $ilSetting, ilBlockGUI\addHeaderLink(), getBlockType(), getContent(), getMembershipItemsBlockHTML(), getSelectedItemsBlockHTML(), setContent(), ilBlockGUI\setData(), ilBlockGUI\setEnableDetailRow(), and ilBlockGUI\setTitle().

Referenced by orderPDItemsByLocation(), and orderPDItemsByType().

{
// both views are activated (show buttons)
if($ilSetting->get('disable_my_offers') == 0 &&
$ilSetting->get('disable_my_memberships') == 0)
{
$ilCtrl->setParameter($this, 'block_type', $this->getBlockType());
$ilCtrl->setParameter($this, 'view', self::VIEW_MY_OFFERS);
$this->addHeaderLink($ilCtrl->getLinkTarget($this, 'changeView'), $this->lng->txt('pd_my_offers'),
($this->view == self::VIEW_MY_OFFERS ? false : true)
);
$ilCtrl->setParameter($this, 'view', self::VIEW_MY_MEMBERSHIPS);
$this->addHeaderLink($ilCtrl->getLinkTarget($this, 'changeView'), $this->lng->txt('pd_my_memberships'),
($this->view == self::VIEW_MY_MEMBERSHIPS ? false : true)
);
$ilCtrl->clearParameters($this);
}
// workaround to show details row
$this->setData(array("dummy"));
switch((int)$this->view)
{
case self::VIEW_MY_MEMBERSHIPS:
$this->setTitle($this->lng->txt('pd_my_memberships'));
break;
case self::VIEW_MY_OFFERS:
default:
if(!in_array(self::VIEW_MY_MEMBERSHIPS, $this->allowed_views))
{
$this->setTitle($this->lng->txt('selected_items'));
}
else
{
$this->setTitle($this->lng->txt('pd_my_offers'));
}
break;
}
if ($this->getContent() == "")
{
$this->setEnableDetailRow(false);
}
$ilCtrl->clearParametersByClass("ilpersonaldesktopgui");
$ilCtrl->clearParameters($this);
return parent::getHTML();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getIntroduction ( )

Get overview.

Definition at line 1232 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $lng, $title, $tpl, and ilUtil\getImagePath().

Referenced by fillDataSection().

{
global $ilUser, $lng, $ilCtrl, $tree;
switch((int)$this->view)
{
case self::VIEW_MY_MEMBERSHIPS:
$tpl = new ilTemplate('tpl.pd_my_memberships_intro.html', true, true, 'Services/PersonalDesktop');
$tpl->setVariable('IMG_PD_LARGE', ilUtil::getImagePath('icon_pd_xxl.gif'));
$tpl->setVariable('TXT_WELCOME', $lng->txt('pd_my_memberships_intro'));
$tpl->setVariable('TXT_INTRO_1', $lng->txt('pd_my_memberships_intro2'));
break;
case self::VIEW_MY_OFFERS:
default:
// get repository link
$nd = $tree->getNodeData(ROOT_FOLDER_ID);
$title = $nd["title"];
if ($title == "ILIAS")
{
$title = $lng->txt("repository");
}
$tpl = new ilTemplate("tpl.pd_intro.html", true, true, "Services/PersonalDesktop");
$tpl->setVariable("IMG_PD_LARGE", ilUtil::getImagePath("icon_pd_xxl.gif"));
$tpl->setVariable("TXT_WELCOME", $lng->txt("pdesk_intro"));
$tpl->setVariable("TXT_INTRO_1", sprintf($lng->txt("pdesk_intro2"), $lng->txt("to_desktop")));
$tpl->setVariable("TXT_INTRO_2", sprintf($lng->txt("pdesk_intro3"),
'<a href="repository.php?cmd=frameset&getlast=true">'.$title.'</a>'));
$tpl->setVariable("TXT_INTRO_3", $lng->txt("pdesk_intro4"));
break;
}
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilPDSelectedItemsBlockGUI::getItemListGUI (   $a_type)

get item list gui class for type

Definition at line 1024 of file class.ilPDSelectedItemsBlockGUI.php.

References $location.

Referenced by getMembershipItemsPerLocation(), and getSelectedItemsPerLocation().

{
global $objDefinition;
//echo "<br>+$a_type+";
if (!isset($this->item_list_guis[$a_type]))
{
$class = $objDefinition->getClassName($a_type);
$location = $objDefinition->getLocation($a_type);
$full_class = "ilObj".$class."ListGUI";
//echo "<br>-".$location."/class.".$full_class.".php"."-";
include_once($location."/class.".$full_class.".php");
$item_list_gui = new $full_class();
$this->item_list_guis[$a_type] =& $item_list_gui;
}
else
{
$item_list_gui =& $this->item_list_guis[$a_type];
}
return $item_list_gui;
}

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getMembershipItemsBlockHTML ( )

Gateway method to distinguish between sorting type.

public

Returns
string the generated block html string

Definition at line 687 of file class.ilPDSelectedItemsBlockGUI.php.

References $ok, $tpl, getMembershipItemsPerLocation(), getMembershipItemsPerType(), and newBlockTemplate().

Referenced by getHTML().

{
global $ilUser;
$tpl = $this->newBlockTemplate();
switch($ilUser->getPref('pd_order_items'))
{
case 'location':
break;
default:
break;
}
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getMembershipItemsPerLocation (   $tpl)

Generates the block html string by location ordering.

public

Parameters
ilTemplate$tplthe current template instance

Definition at line 415 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ilSetting, $tpl, addParentRow(), addStandardRow(), ilBlockGUI\getCurrentDetailLevel(), getItemListGUI(), getObjectsByMembership(), and resetRowType().

Referenced by getMembershipItemsBlockHTML().

{
global $ilUser, $rbacsystem, $objDefinition, $ilBench, $ilSetting, $ilObjDataCache, $rbacreview;
$output = false;
$items = $this->getObjectsByMembership();
$item_html = array();
if(count($items) > 0)
{
// preload object data cache
$ref_ids = array();
foreach($items as $item)
{
$ref_ids[] = $item['ref_id'];
}
reset($items);
$ilObjDataCache->preloadReferenceCache($ref_ids);
foreach($items as $item)
{
//echo "1";
// get list gui class for each object type
if ($cur_obj_type != $item["type"])
{
$item_list_gui =& $this->getItemListGUI($item["type"]);
$item_list_gui->enableIcon(true);
$item_list_gui->enableDelete(false);
$item_list_gui->enableCut(false);
$item_list_gui->enableCopy(false);
$item_list_gui->enablePayment(false);
$item_list_gui->enableLink(false);
$item_list_gui->enableInfoScreen(false);
$item_list_gui->enableSubscribe(false);
if ($this->getCurrentDetailLevel() < 3)
{
//echo "3";
$item_list_gui->enableDescription(false);
$item_list_gui->enableProperties(false);
$item_list_gui->enablePreconditions(false);
}
if ($this->getCurrentDetailLevel() < 2)
{
$item_list_gui->enableCommands(true, true);
}
}
// render item row
$ilBench->start("ilPersonalDesktopGUI", "getListHTML");
if (is_object($item_list_gui))
{
$html = $item_list_gui->getListItemHTML($item["ref_id"],
$item["obj_id"], $item["title"], $item["description"]);
$ilBench->stop("ilPersonalDesktopGUI", "getListHTML");
if ($html != "")
{
// BEGIN WebDAV: Use $item_list_gui to determine icon image type
$item_html[] = array(
"html" => $html,
"item_ref_id" => $item["ref_id"],
"item_obj_id" => $item["obj_id"],
"parent_ref" => $item["parent_ref"],
"type" => $item["type"],
'item_icon_image_type' => $item_list_gui->getIconImageType()
);
// END WebDAV: Use $item_list_gui to determine icon image type
}
}
}
// output block for resource type
if (count($item_html) > 0)
{
$cur_parent_ref = 0;
// content row
foreach($item_html as $item)
{
// add a parent header row for each new parent
if ($cur_parent_ref != $item["parent_ref"])
{
if ($ilSetting->get("icon_position_in_lists") == "item_rows")
{
$this->addParentRow($tpl, $item["parent_ref"], false);
}
else
{
$this->addParentRow($tpl, $item["parent_ref"]);
}
$this->resetRowType();
$cur_parent_ref = $item["parent_ref"];
}
// BEGIN WebDAV: Use $item_list_gui to determine icon image type.
$this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"],
$item['item_icon_image_type'],
"th_".$cur_parent_ref);
// END WebDAV: Use $item_list_gui to determine icon image type.
$output = true;
}
}
}
return $output;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getMembershipItemsPerType (   $tpl)

Generates the block html string by type ordering.

public

Parameters
ilTemplate$tplthe current template instance

Definition at line 527 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ilSetting, $location, $t, $title, $tpl, addHeaderRow(), addStandardRow(), ilBlockGUI\getCurrentDetailLevel(), getObjectsByMembership(), and resetRowType().

Referenced by getMembershipItemsBlockHTML().

{
global $ilUser, $rbacsystem, $objDefinition, $ilBench, $ilSetting, $ilObjDataCache;
$output = false;
$objtype_groups = $objDefinition->getGroupedRepositoryObjectTypes(
array("cat", "crs", "grp", "fold"));
$types = array();
foreach($objtype_groups as $grp => $grpdata)
{
$types[] = array(
"grp" => $grp,
"title" => $this->lng->txt("objs_".$grp),
"types" => $grpdata["objs"]);
}
foreach ($types as $t)
{
$type = $t["types"];
$title = $t["title"];
$grp = $t["grp"];
$items = $this->getObjectsByMembership($type);
//var_dump($items);
// preload object data cache
$ref_ids = array();
foreach($items as $item)
{
$ref_ids[] = $item['ref_id'];
}
reset($items);
$ilObjDataCache->preloadReferenceCache($ref_ids);
$item_html = array();
if ($this->getCurrentDetailLevel() == 3)
{
$rel_header = "th_".$grp;
}
if (count($items) > 0)
{
$tstCount = 0;
$unsetCount = 0;
$progressCount = 0;
$unsetFlag = 0;
$progressFlag = 0;
$completedFlag = 0;
if (strcmp($a_type, "tst") == 0) {
$items = $this->multiarray_sort($items, "used_tries; title");
foreach ($items as $tst_item) {
if (!isset($tst_item["used_tries"])) {
$unsetCount++;
}
elseif ($tst_item["used_tries"] == 0) {
$progressCount++;
}
}
}
foreach($items as $item)
{
// get list gui class for each object type
if ($cur_obj_type != $item["type"])
{
$class = $objDefinition->getClassName($item["type"]);
$location = $objDefinition->getLocation($item["type"]);
$full_class = "ilObj".$class."ListGUI";
include_once($location."/class.".$full_class.".php");
$item_list_gui = new $full_class();
$item_list_gui->enableIcon(true);
$item_list_gui->enableDelete(false);
$item_list_gui->enableCut(false);
$item_list_gui->enableCopy(false);
$item_list_gui->enablePayment(false);
$item_list_gui->enableLink(false);
$item_list_gui->enableInfoScreen(false);
$item_list_gui->enableSubscribe(false);
if ($this->getCurrentDetailLevel() < 3)
{
$item_list_gui->enableDescription(false);
$item_list_gui->enableProperties(false);
$item_list_gui->enablePreconditions(false);
$item_list_gui->enableNoticeProperties(false);
}
if ($this->getCurrentDetailLevel() < 2)
{
$item_list_gui->enableCommands(true, true);
}
}
// render item row
$ilBench->start("ilPersonalDesktopGUI", "getListHTML");
$html = $item_list_gui->getListItemHTML($item["ref_id"],
$item["obj_id"], $item["title"], $item["description"]);
$ilBench->stop("ilPersonalDesktopGUI", "getListHTML");
if ($html != "")
{
// BEGIN WebDAV: Use $item_list_gui to determine icon image type
$item_html[] = array(
"html" => $html,
"item_ref_id" => $item["ref_id"],
"item_obj_id" => $item["obj_id"],
'item_icon_image_type' => (method_exists($item_list_gui, 'getIconImageType')) ?
$item_list_gui->getIconImageType() :
$item['type']
);
// END WebDAV: Use $item_list_gui to determine icon image type
}
}
// output block for resource type
if (count($item_html) > 0)
{
// add a header for each resource type
if ($this->getCurrentDetailLevel() == 3)
{
if ($ilSetting->get("icon_position_in_lists") == "item_rows")
{
$this->addHeaderRow($tpl, $grp, false);
}
else
{
$this->addHeaderRow($tpl, $grp);
}
$this->resetRowType();
}
// content row
foreach($item_html as $item)
{
if ($this->getCurrentDetailLevel() < 3 ||
$ilSetting->get("icon_position_in_lists") == "item_rows")
{
// BEGIN WebDAV: Use $item_list_gui to determine icon image type
$this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"],
$item['item_icon_image_type'],
$rel_header);
// END WebDAV: Use $item_list_gui to determine icon image type
}
else
{
$this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"], "", $rel_header);
}
$output = true;
}
}
}
}
return $output;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getObjectsByMembership (   $types = array())
protected

Gets all objects the current user is member of.

protected

Returns
Array $items array of objects

Definition at line 353 of file class.ilPDSelectedItemsBlockGUI.php.

References $ref_id, $title, ilObject\_getAllReferences(), and ilParticipants\_getMembershipByType().

Referenced by getMembershipItemsPerLocation(), and getMembershipItemsPerType().

{
global $tree, $ilUser, $ilObjDataCache;
include_once 'Services/Membership/classes/class.ilParticipants.php';
$items = array();
if(is_array($types) && count($types))
{
foreach($types as $type)
{
switch($type)
{
case 'grp':
$items = array_merge(ilParticipants::_getMembershipByType($ilUser->getId(), 'grp'), $items);
break;
case 'crs':
$items = array_merge(ilParticipants::_getMembershipByType($ilUser->getId(), 'crs'), $items);
break;
default:
break;
}
}
}
else
{
$crs_mbs = ilParticipants::_getMembershipByType($ilUser->getId(), 'crs');
$grp_mbs = ilParticipants::_getMembershipByType($ilUser->getId(), 'grp');
$items = array_merge($crs_mbs, $grp_mbs);
}
$references = array();
foreach($items as $key => $obj_id)
{
$item_references = ilObject::_getAllReferences($obj_id);
if(is_array($item_references) && count($item_references))
{
foreach($item_references as $ref_id)
{
$title = $ilObjDataCache->lookupTitle($obj_id);
$type = $ilObjDataCache->lookupType($obj_id);
$references[$title.$ref_id] =
array('ref_id' => $ref_id,
'obj_id' => $obj_id,
'type' => $type,
'title' => $title,
'description' => $ilObjDataCache->lookupDescription($obj_id),
'parent_ref' => $tree->getParentId($ref_id));
}
}
}
ksort($references);
return is_array($references) ? $references : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getSelectedItemsBlockHTML ( )

get selected item block

Definition at line 710 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ok, $tpl, getSelectedItemsPerLocation(), getSelectedItemsPerType(), and newBlockTemplate().

Referenced by getHTML().

{
global $ilUser, $rbacsystem, $objDefinition, $ilBench;
$tpl =& $this->newBlockTemplate();
switch ($ilUser->getPref("pd_order_items"))
{
case "location":
break;
default:
break;
}
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getSelectedItemsPerLocation ( $tpl)

get selected items per type

Definition at line 896 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ilSetting, $tpl, addParentRow(), addStandardRow(), ilBlockGUI\getCurrentDetailLevel(), getItemListGUI(), and resetRowType().

Referenced by getSelectedItemsBlockHTML().

{
global $ilUser, $rbacsystem, $objDefinition, $ilBench, $ilSetting, $ilObjDataCache, $tree;
$output = false;
$items = $ilUser->getDesktopItems();
$item_html = array();
$cur_obj_type = "";
if (count($items) > 0)
{
// preload object data cache
$ref_ids = array();
foreach($items as $item)
{
$ref_ids[] = $item["ref_id"];
}
reset($items);
$tree->preloadDeleted($ref_ids);
$tree->preloadDepthParent($ref_ids);
$ilObjDataCache->preloadReferenceCache($ref_ids);
foreach($items as $item)
{
//echo "1";
// get list gui class for each object type
if ($cur_obj_type != $item["type"])
{
$item_list_gui =& $this->getItemListGUI($item["type"]);
$item_list_gui->enableIcon(true);
$item_list_gui->enableDelete(false);
$item_list_gui->enableCut(false);
$item_list_gui->enableCopy(false);
$item_list_gui->enablePayment(false);
$item_list_gui->enableLink(false);
$item_list_gui->enableInfoScreen(false);
if ($this->getCurrentDetailLevel() < 3)
{
//echo "3";
$item_list_gui->enableDescription(false);
$item_list_gui->enableProperties(false);
$item_list_gui->enablePreconditions(false);
}
if ($this->getCurrentDetailLevel() < 2)
{
$item_list_gui->enableCommands(true, true);
}
}
// render item row
$ilBench->start("ilPersonalDesktopGUI", "getListHTML");
$item_list_gui->setContainerObject($this);
$html = $item_list_gui->getListItemHTML($item["ref_id"],
$item["obj_id"], $item["title"], $item["description"]);
$ilBench->stop("ilPersonalDesktopGUI", "getListHTML");
if ($html != "")
{
// BEGIN WebDAV: Use $item_list_gui to determine icon image type
$item_html[] = array(
"html" => $html,
"item_ref_id" => $item["ref_id"],
"item_obj_id" => $item["obj_id"],
"parent_ref" => $item["parent_ref"],
"type" => $item["type"],
'item_icon_image_type' => $item_list_gui->getIconImageType()
);
// END WebDAV: Use $item_list_gui to determine icon image type
}
}
// output block for resource type
if (count($item_html) > 0)
{
$cur_parent_ref = 0;
// content row
foreach($item_html as $item)
{
// add a parent header row for each new parent
if ($cur_parent_ref != $item["parent_ref"])
{
if ($ilSetting->get("icon_position_in_lists") == "item_rows")
{
$this->addParentRow($tpl, $item["parent_ref"], false);
}
else
{
$this->addParentRow($tpl, $item["parent_ref"]);
}
$this->resetRowType();
$cur_parent_ref = $item["parent_ref"];
}
// BEGIN WebDAV: Use $item_list_gui to determine icon image type.
$this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"],
$item['item_icon_image_type'],
"th_".$cur_parent_ref);
// END WebDAV: Use $item_list_gui to determine icon image type.
$output = true;
}
}
}
return $output;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::getSelectedItemsPerType ( $tpl)

get selected items per type

Definition at line 733 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilBench, $ilSetting, $location, $t, $title, $tpl, addHeaderRow(), addStandardRow(), ilBlockGUI\getCurrentDetailLevel(), and resetRowType().

Referenced by getSelectedItemsBlockHTML().

{
global $ilUser, $rbacsystem, $objDefinition, $ilBench, $ilSetting, $ilObjDataCache, $tree;
$items = $ilUser->getDesktopItems();
if (count($items) > 0)
{
// preload object data cache
$ref_ids = array();
foreach($items as $item)
{
$ref_ids[] = $item["ref_id"];
}
$tree->preloadDeleted($ref_ids);
$tree->preloadDepthParent($ref_ids);
$ilObjDataCache->preloadReferenceCache($ref_ids, true);
}
$output = false;
$objtype_groups = $objDefinition->getGroupedRepositoryObjectTypes(
array("cat", "crs", "grp", "fold"));
$types = array();
foreach($objtype_groups as $grp => $grpdata)
{
$types[] = array(
"grp" => $grp,
"title" => $this->lng->txt("objs_".$grp),
"types" => $grpdata["objs"]);
}
foreach ($types as $t)
{
$type = $t["types"];
$title = $t["title"];
$grp = $t["grp"];
$items = $ilUser->getDesktopItems($type);
$item_html = array();
if ($this->getCurrentDetailLevel() == 3)
{
$rel_header = "th_".$grp;
}
if (count($items) > 0)
{
$tstCount = 0;
$unsetCount = 0;
$progressCount = 0;
$unsetFlag = 0;
$progressFlag = 0;
$completedFlag = 0;
if (strcmp($a_type, "tst") == 0) {
$items = $this->multiarray_sort($items, "used_tries; title");
foreach ($items as $tst_item) {
if (!isset($tst_item["used_tries"])) {
$unsetCount++;
}
elseif ($tst_item["used_tries"] == 0) {
$progressCount++;
}
}
}
foreach($items as $item)
{
// get list gui class for each object type
if ($cur_obj_type != $item["type"])
{
$class = $objDefinition->getClassName($item["type"]);
$location = $objDefinition->getLocation($item["type"]);
$full_class = "ilObj".$class."ListGUI";
include_once($location."/class.".$full_class.".php");
$item_list_gui = new $full_class();
$item_list_gui->enableIcon(true);
$item_list_gui->enableDelete(false);
$item_list_gui->enableCut(false);
$item_list_gui->enableCopy(false);
$item_list_gui->enablePayment(false);
$item_list_gui->enableLink(false);
$item_list_gui->enableInfoScreen(false);
$item_list_gui->setContainerObject($this);
if ($this->getCurrentDetailLevel() < 3)
{
$item_list_gui->enableDescription(false);
$item_list_gui->enableProperties(false);
$item_list_gui->enablePreconditions(false);
$item_list_gui->enableNoticeProperties(false);
}
if ($this->getCurrentDetailLevel() < 2)
{
$item_list_gui->enableCommands(true, true);
}
}
// render item row
$ilBench->start("ilPersonalDesktopGUI", "getListHTML");
$html = $item_list_gui->getListItemHTML($item["ref_id"],
$item["obj_id"], $item["title"], $item["description"]);
$ilBench->stop("ilPersonalDesktopGUI", "getListHTML");
if ($html != "")
{
// BEGIN WebDAV: Use $item_list_gui to determine icon image type
$item_html[] = array(
"html" => $html,
"item_ref_id" => $item["ref_id"],
"item_obj_id" => $item["obj_id"],
'item_icon_image_type' => (method_exists($item_list_gui, 'getIconImageType')) ?
$item_list_gui->getIconImageType() :
$item['type']
);
// END WebDAV: Use $item_list_gui to determine icon image type
}
}
// output block for resource type
if (count($item_html) > 0)
{
// add a header for each resource type
if ($this->getCurrentDetailLevel() == 3)
{
if ($ilSetting->get("icon_position_in_lists") == "item_rows")
{
$this->addHeaderRow($tpl, $grp, false);
}
else
{
$this->addHeaderRow($tpl, $grp);
}
$this->resetRowType();
}
// content row
foreach($item_html as $item)
{
if ($this->getCurrentDetailLevel() < 3 ||
$ilSetting->get("icon_position_in_lists") == "item_rows")
{
// BEGIN WebDAV: Use $item_list_gui to determine icon image type
$this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"],
$item['item_icon_image_type'],
$rel_header);
// END WebDAV: Use $item_list_gui to determine icon image type
}
else
{
$this->addStandardRow($tpl, $item["html"], $item["item_ref_id"], $item["item_obj_id"], "", $rel_header);
}
$output = true;
}
}
}
}
return $output;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::ilPDSelectedItemsBlockGUI ( )

Constructor.

Definition at line 48 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, $lng, determineViewSettings(), ilBlockGUI\ilBlockGUI(), ilBlockGUI\setAvailableDetailLevels(), ilBlockGUI\setBigMode(), ilBlockGUI\setColSpan(), ilBlockGUI\setEnableNumInfo(), and ilBlockGUI\setLimit().

{
global $ilCtrl, $lng, $ilUser;
$lng->loadLanguageModule('pd');
//$this->setImage(ilUtil::getImagePath("icon_bm_s.gif"));
$this->setEnableNumInfo(false);
$this->setLimit(99999);
$this->setColSpan(2);
$this->setBigMode(true);
$this->lng = $lng;
$this->allow_moving = false;
}

+ Here is the call graph for this function:

static ilPDSelectedItemsBlockGUI::isRepositoryObject ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 175 of file class.ilPDSelectedItemsBlockGUI.php.

{
return false;
}
& ilPDSelectedItemsBlockGUI::newBlockTemplate ( )

returns a new list block template

private

Returns
object block template

Definition at line 1014 of file class.ilPDSelectedItemsBlockGUI.php.

References $tpl.

Referenced by getMembershipItemsBlockHTML(), and getSelectedItemsBlockHTML().

{
$tpl = new ilTemplate ("tpl.pd_list_block.html", true, true, "Services/PersonalDesktop");
$this->cur_row_type = "";
return $tpl;
}

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::orderPDItemsByLocation ( )

order desktop items by location

Definition at line 1271 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, exit, and getHTML().

{
global $ilUser, $ilCtrl;
$ilUser->writePref("pd_order_items", "location");
if ($ilCtrl->isAsynch())
{
echo $this->getHTML();
}
else
{
$ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
}
}

+ Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::orderPDItemsByType ( )

order desktop items by Type

Definition at line 1291 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, exit, and getHTML().

{
global $ilUser, $ilCtrl;
$ilUser->writePref("pd_order_items", "type");
if ($ilCtrl->isAsynch())
{
echo $this->getHTML();
}
else
{
$ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
}
}

+ Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::removeFromDeskObject ( )
See Also
ilDesktopItemHandling::removeFromDesk()

Implements ilDesktopItemHandling.

Definition at line 83 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilCtrl, and ilDesktopItemGUI\removeFromDesktop().

{
global $ilCtrl;
include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
$ilCtrl->redirectByClass('ilpersonaldesktopgui', 'show');
}

+ Here is the call graph for this function:

ilPDSelectedItemsBlockGUI::resetRowType ( )

Definition at line 1003 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by getMembershipItemsPerLocation(), getMembershipItemsPerType(), getSelectedItemsPerLocation(), and getSelectedItemsPerType().

{
$this->cur_row_type = "";
}

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::setContent (   $a_content)

Definition at line 261 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by getHTML().

{
$this->content = $a_content;
}

+ Here is the caller graph for this function:

ilPDSelectedItemsBlockGUI::setFooterLinks ( )

Set footer links.

Definition at line 304 of file class.ilPDSelectedItemsBlockGUI.php.

References ilBlockGUI\$block_id, $ilCtrl, $lng, ilBlockGUI\addFooterLink(), getContent(), and ilBlockGUI\setEnableNumInfo().

Referenced by fillFooter().

{
global $ilUser, $ilCtrl, $lng;
if ($this->getContent() == "")
{
$this->setEnableNumInfo(false);
return "";
}
// by type
if ($ilUser->getPref("pd_order_items") == 'location')
{
$this->addFooterLink( $lng->txt("by_type"),
$ilCtrl->getLinkTarget($this,
"orderPDItemsByType"),
$ilCtrl->getLinkTarget($this,
"orderPDItemsByType", "", true),
"block_".$this->getBlockType()."_".$this->block_id
);
}
else
{
$this->addFooterLink($lng->txt("by_type"));
}
// by location
if ($ilUser->getPref("pd_order_items") == 'location')
{
$this->addFooterLink($lng->txt("by_location"));
}
else
{
$this->addFooterLink( $lng->txt("by_location"),
$ilCtrl->getLinkTarget($this,
"orderPDItemsByLocation"),
$ilCtrl->getLinkTarget($this,
"orderPDItemsByLocation", "", true),
"block_".$this->getBlockType()."_".$this->block_id
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilPDSelectedItemsBlockGUI::$allowed_views = array()
private

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

ilPDSelectedItemsBlockGUI::$block_type = "pditems"
static

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

Referenced by getBlockType().

ilPDSelectedItemsBlockGUI::$view = self::VIEW_MY_OFFERS
private

Definition at line 42 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by changeView().

const ilPDSelectedItemsBlockGUI::VIEW_MY_MEMBERSHIPS = 1

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

Referenced by determineViewSettings().

const ilPDSelectedItemsBlockGUI::VIEW_MY_OFFERS = 0

Definition at line 37 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by determineViewSettings().


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