ILIAS  Release_4_4_x_branch Revision 61816
 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 ()
 Handle config status.
 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, $a_checked=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, $a_checked=false)
 Add a footer text/link.
 getFooterLinks ()
 Get footer links.
 clearFooterLinks ()
 Clear footer links.
 handleDetailLevel ()
 Handle read/write current detail level.
 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.

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")
 preloadData (array $data)
 Can be overwritten in subclasses.
- 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 = ""
 $dropdown

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 16 of file class.ilBookmarkBlockGUI.php.

Member Function Documentation

& ilBookmarkBlockGUI::executeCommand ( )

execute command

Definition at line 77 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 104 of file class.ilBookmarkBlockGUI.php.

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

{
global $ilUser;
include_once("./Services/Bookmarks/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/Bookmarks");
$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 156 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, $ilUser, $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 268 of file class.ilBookmarkBlockGUI.php.

References $ilUser, 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 45 of file class.ilBookmarkBlockGUI.php.

References $block_type.

{
}
ilBookmarkBlockGUI::getHTML ( )

Handle config status.

Get HTML.

Reimplemented from ilBlockGUI.

Definition at line 87 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 203 of file class.ilBookmarkBlockGUI.php.

References $_SESSION, ilBlockGUI\$data, $ilCtrl, $ilUser, $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/Bookmarks/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_bmf_s.png"),
"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_bmf_s.png"),
"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.png"),
"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 291 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, $ilUser, 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 141 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, and $ilUser.

Referenced by fillDataSection().

{
global $ilCtrl, $ilUser;
include_once("./Services/Bookmarks/classes/class.ilBookmarkBlockExplorerGUI.php");
$exp = new ilBookmarkBlockExplorerGUI($this, "getPDBookmarkListHTMLTree");
if (!$exp->handleCommand())
{
return "<div id='tree_div'>".$exp->getHTML()."</div>";
}
}

+ Here is the caller graph for this function:

static ilBookmarkBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Reimplemented from ilBlockGUI.

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

References $_GET, and IL_SCREEN_SIDE.

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

Constructor.

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

References $_GET, $ilCtrl, $ilUser, $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.png"));
$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 55 of file class.ilBookmarkBlockGUI.php.

{
return false;
}
ilBookmarkBlockGUI::setCurrentBookmarkFolder ( )

set current bookmarkfolder on personal desktop

Definition at line 340 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 173 of file class.ilBookmarkBlockGUI.php.

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

Referenced by fillFooter().

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

+ 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 302 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, $ilUser, 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 321 of file class.ilBookmarkBlockGUI.php.

References $ilCtrl, $ilUser, 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 18 of file class.ilBookmarkBlockGUI.php.

Referenced by getBlockType().


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