ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilBookmarkBlockGUI Class Reference

BlockGUI class for Bookmarks block. More...

+ Inheritance diagram for ilBookmarkBlockGUI:
+ Collaboration diagram for ilBookmarkBlockGUI:

Public Member Functions

 ilBookmarkBlockGUI ()
 Constructor.
executeCommand ()
 execute command
 getHTML ()
 Get HTML.
 fillDataSection ()
 Fill data section.
 getPDBookmarkListHTMLTree ()
 get tree bookmark list for personal desktop
 fillFooter ()
 block footer
 setFooterLinks ()
 Set footer links.
 getListRowData ()
 Get list data (for flat list).
 fillRow ($a_set)
 get flat bookmark list for personal desktop
 getOverview ()
 Get overview.
 setPdFlatMode ()
 set current desktop view mode to flat
 setPdTreeMode ()
 set current desktop view mode to tree
 setCurrentBookmarkFolder ()
 set current bookmarkfolder on personal desktop
- 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.
 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 ()
 Is block used in repository object?
static getScreenMode ()
 Get Screen Mode for current command.

Static Public Attributes

static $block_type = "pdbookm"

Additional Inherited Members

- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")
- 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 Bookmarks block.

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

ilBookmarkBlockGUI: ilColumnGUI

Definition at line 34 of file class.ilBookmarkBlockGUI.php.

Member Function Documentation

& ilBookmarkBlockGUI::executeCommand ( )

execute command

Definition at line 95 of file class.ilBookmarkBlockGUI.php.

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class = $ilCtrl->getNextClass();
$cmd = $ilCtrl->getCmd("getHTML");
return $this->$cmd();
}
ilBookmarkBlockGUI::fillDataSection ( )

Fill data section.

Reimplemented from ilBlockGUI.

Definition at line 123 of file class.ilBookmarkBlockGUI.php.

References ilBookmarkFolder\_getNumberOfObjects(), ilBlockGUI\getCurrentDetailLevel(), getListRowData(), getOverview(), getPDBookmarkListHTMLTree(), ilBlockGUI\setColSpan(), ilBlockGUI\setDataSection(), ilBlockGUI\setEnableDetailRow(), and ilBlockGUI\setRowTemplate().

{
global $ilUser;
include_once("./Services/PersonalDesktop/classes/class.ilBookmarkFolder.php");
$this->num_bookmarks = $bm_items["bookmarks"];
$this->num_folders = $bm_items["folders"];
if ($this->getCurrentDetailLevel() > 1 &&
($this->num_bookmarks > 0 || $this->num_folders > 0))
{
if ($ilUser->getPref("il_pd_bkm_mode") == 'tree')
{
}
else
{
$this->setRowTemplate("tpl.bookmark_pd_list.html", "Services/PersonalDesktop");
$this->getListRowData();
$this->setColSpan(2);
}
}
else
{
if ($this->num_bookmarks == 0 && $this->num_folders == 0)
{
$this->setEnableDetailRow(false);
}
$this->setDataSection($this->getOverview());
}
}

+ Here is the call graph for this function:

ilBookmarkBlockGUI::fillFooter ( )

block footer

Reimplemented from ilBlockGUI.

Definition at line 195 of file class.ilBookmarkBlockGUI.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:

ilBookmarkBlockGUI::fillRow (   $a_set)

get flat bookmark list for personal desktop

Reimplemented from ilBlockGUI.

Definition at line 320 of file class.ilBookmarkBlockGUI.php.

References ilBlockGUI\getCurrentDetailLevel(), and ilUtil\prepareFormOutput().

{
global $ilUser;
$this->tpl->setVariable("IMG_BM", $a_set["img"]);
$this->tpl->setVariable("IMG_ALT", $a_set["alt"]);
$this->tpl->setVariable("BM_TITLE", $a_set["title"]);
$this->tpl->setVariable("BM_LINK", $a_set["link"]);
$this->tpl->setVariable("BM_TARGET", ilUtil::prepareFormOutput($a_set["target"]));
if ($this->getCurrentDetailLevel() > 2)
{
$this->tpl->setVariable("BM_DESCRIPTION", ilUtil::prepareFormOutput($a_set["desc"]));
}
else
{
$this->tpl->setVariable("BM_TOOLTIP", ilUtil::prepareFormOutput($a_set["desc"]));
}
}

+ Here is the call graph for this function:

static ilBookmarkBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 63 of file class.ilBookmarkBlockGUI.php.

References $block_type.

{
}
ilBookmarkBlockGUI::getHTML ( )

Get HTML.

Reimplemented from ilBlockGUI.

Definition at line 105 of file class.ilBookmarkBlockGUI.php.

References ilBlockGUI\getCurrentDetailLevel(), and ilBlockGUI\setData().

Referenced by setPdFlatMode(), and setPdTreeMode().

{
// workaround to show details row
$this->setData(array("dummy"));
if ($this->getCurrentDetailLevel() == 0)
{
return "";
}
else
{
return parent::getHTML();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilBookmarkBlockGUI::getListRowData ( )

Get list data (for flat list).

Definition at line 255 of file class.ilBookmarkBlockGUI.php.

References $_SESSION, ilBlockGUI\$data, $ilCtrl, $lng, ilBookmarkFolder\_getParentId(), ilBookmarkFolder\_lookupTitle(), ilUtil\getImagePath(), ilBookmarkFolder\getObjects(), ilBlockGUI\getTitle(), ilBookmarkFolder\isRootFolder(), ilUtil\prepareFormOutput(), ilBlockGUI\setData(), and ilBlockGUI\setTitle().

Referenced by fillDataSection().

{
global $ilUser, $lng, $ilCtrl;
include_once("./Services/PersonalDesktop/classes/class.ilBookmarkFolder.php");
$data = array();
$sess_cur_bm_folder = "";
if (isset($_SESSION["ilCurBMFolder"]))
{
$sess_cur_bm_folder = $_SESSION["ilCurBMFolder"];
}
$bm_items = ilBookmarkFolder::getObjects($sess_cur_bm_folder);
if (!ilBookmarkFolder::isRootFolder($sess_cur_bm_folder)
&& !empty($_SESSION["ilCurBMFolder"]))
{
$ilCtrl->setParameter($this, "curBMFolder",
ilBookmarkFolder::_getParentId($sess_cur_bm_folder));
$data[] = array(
"img" => ilUtil::getImagePath("icon_cat_s.gif"),
"alt" => $lng->txt("bmf"),
"title" => "..",
"link" => $ilCtrl->getLinkTarget($this, "setCurrentBookmarkFolder"));
$this->setTitle($this->getTitle().": ".ilBookmarkFolder::_lookupTitle($sess_cur_bm_folder));
}
foreach ($bm_items as $bm_item)
{
switch ($bm_item["type"])
{
case "bmf":
$ilCtrl->setParameter($this, "curBMFolder", $bm_item["obj_id"]);
$data[] = array(
"img" => ilUtil::getImagePath("icon_cat_s.gif"),
"alt" => $lng->txt("bmf"),
"title" => ilUtil::prepareFormOutput($bm_item["title"]),
"desc" => ilUtil::prepareFormOutput($bm_item["desc"]),
"link" => $ilCtrl->getLinkTarget($this,
"setCurrentBookmarkFolder"),
"target" => "");
break;
case "bm":
$data[] = array(
"img" => ilUtil::getImagePath("spacer.gif"),
"alt" => $lng->txt("bm"),
"title" => ilUtil::prepareFormOutput($bm_item["title"]),
"desc" => ilUtil::prepareFormOutput($bm_item["desc"]),
"link" => ilUtil::prepareFormOutput($bm_item["target"]),
"target" => "_blank");
break;
}
}
$this->setData($data);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilBookmarkBlockGUI::getOverview ( )

Get overview.

Definition at line 343 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, and $lng.

Referenced by fillDataSection().

{
global $ilUser, $lng, $ilCtrl;
return '<div class="small">'.$this->num_bookmarks." ".$lng->txt("bm_num_bookmarks").", ".
$this->num_folders." ".$lng->txt("bm_num_bookmark_folders")."</div>";
}

+ Here is the caller graph for this function:

ilBookmarkBlockGUI::getPDBookmarkListHTMLTree ( )

get tree bookmark list for personal desktop

Definition at line 160 of file class.ilBookmarkBlockGUI.php.

References $_GET, $_SESSION, $ilCtrl, ilBlockGUI\getCurrentDetailLevel(), and ilBookmarkExplorer\setAllowedTypes().

Referenced by fillDataSection().

{
global $ilCtrl, $ilUser;
include_once("./Services/PersonalDesktop/classes/class.ilBookmarkExplorer.php");
$showdetails = ($this->getCurrentDetailLevel() > 2);
$exp = new ilBookmarkExplorer($ilCtrl->getLinkTargetByClass("ilpersonaldesktopgui", "show"),
$_SESSION["AccountId"]);
$exp->setAllowedTypes(array('dum','bmf','bm'));
$exp->setEnableSmallMode(true);
$exp->setTargetGet("bmf_id");
$exp->setSessionExpandVariable('mexpand');
$ilCtrl->setParameter($this, "bmf_id", $this->id);
$exp->setExpandTarget($ilCtrl->getLinkTargetByClass("ilpersonaldesktopgui", "show"));
if ($_GET["mexpand"] == "")
{
$expanded = $this->id;
}
else
{
$expanded = $_GET["mexpand"];
}
$exp->setExpand($expanded);
$exp->setShowDetails($showdetails);
// build html-output
$exp->setOutput(0);
return $exp->getOutput();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilBookmarkBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Reimplemented from ilBlockGUI.

Definition at line 82 of file class.ilBookmarkBlockGUI.php.

References $_GET, and IL_SCREEN_SIDE.

{
switch($_GET["cmd"])
{
default:
break;
}
}
ilBookmarkBlockGUI::ilBookmarkBlockGUI ( )

Constructor.

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

References $_GET, $ilCtrl, $lng, ilUtil\getImagePath(), ilBlockGUI\ilBlockGUI(), ilBlockGUI\setAvailableDetailLevels(), ilBlockGUI\setEnableNumInfo(), ilBlockGUI\setImage(), ilBlockGUI\setLimit(), and ilBlockGUI\setTitle().

{
global $ilCtrl, $lng, $ilUser;
$this->setImage(ilUtil::getImagePath("icon_bm_s.gif"));
$this->setTitle($lng->txt("my_bms"));
$this->setEnableNumInfo(false);
$this->setLimit(99999);
$this->id = (empty($_GET["bmf_id"]))
? $bmf_id = 1
: $_GET["bmf_id"];
}

+ Here is the call graph for this function:

static ilBookmarkBlockGUI::isRepositoryObject ( )
static

Is block used in repository object?

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 73 of file class.ilBookmarkBlockGUI.php.

{
return false;
}
ilBookmarkBlockGUI::setCurrentBookmarkFolder ( )

set current bookmarkfolder on personal desktop

Definition at line 392 of file class.ilBookmarkBlockGUI.php.

References $_GET, $_SESSION, and $ilCtrl.

{
global $ilCtrl;
$_SESSION["ilCurBMFolder"] = $_GET["curBMFolder"];
$ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
}
ilBookmarkBlockGUI::setFooterLinks ( )

Set footer links.

Definition at line 212 of file class.ilBookmarkBlockGUI.php.

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

Referenced by fillFooter().

{
global $ilUser, $ilCtrl, $lng;
if ($this->num_bookmarks == 0 && $this->num_folders == 0)
{
return;
}
// flat
if ($ilUser->getPref("il_pd_bkm_mode") == 'tree')
{
$this->addFooterLink( $lng->txt("list"),
$ilCtrl->getLinkTarget($this, "setPdFlatMode"),
$ilCtrl->getLinkTarget($this, "setPdFlatMode",
"", true),
"block_".$this->getBlockType()."_".$this->block_id);
}
else
{
$this->addFooterLink($lng->txt("list"));
}
// as tree
if ($ilUser->getPref("il_pd_bkm_mode") == 'tree')
{
$this->addFooterLink($lng->txt("tree"));
}
else
{
$this->addFooterLink($lng->txt("tree"),
$ilCtrl->getLinkTarget($this,
"setPdTreeMode"),
$ilCtrl->getLinkTarget($this,
"setPdTreeMode", "", true),
"block_".$this->getBlockType()."_".$this->block_id
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilBookmarkBlockGUI::setPdFlatMode ( )

set current desktop view mode to flat

Definition at line 354 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, exit, and getHTML().

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

+ Here is the call graph for this function:

ilBookmarkBlockGUI::setPdTreeMode ( )

set current desktop view mode to tree

Definition at line 373 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, exit, and getHTML().

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

+ Here is the call graph for this function:

Field Documentation

ilBookmarkBlockGUI::$block_type = "pdbookm"
static

Definition at line 36 of file class.ilBookmarkBlockGUI.php.

Referenced by getBlockType().


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