5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
27 $this->ctrl = $DIC->ctrl();
28 $this->lng = $DIC->language();
29 $this->
user = $DIC->user();
30 $lng = $DIC->language();
32 parent::__construct();
40 $this->
id = (empty(
$_GET[
"bmf_id"]))
52 return self::$block_type;
71 switch (
$_GET[
"cmd"]) {
85 $next_class =
$ilCtrl->getNextClass();
86 $cmd =
$ilCtrl->getCmd(
"getHTML");
98 return parent::getHTML();
109 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
111 $this->num_bookmarks = $bm_items[
"bookmarks"];
112 $this->num_folders = $bm_items[
"folders"];
115 ($this->num_bookmarks > 0 || $this->num_folders > 0)) {
116 if (
$ilUser->getPref(
"il_pd_bkm_mode") ==
'tree') {
119 $this->
setRowTemplate(
"tpl.bookmark_pd_list.html",
"Services/Bookmarks");
122 parent::fillDataSection();
125 if ($this->num_bookmarks == 0 && $this->num_folders == 0) {
140 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkBlockExplorerGUI.php");
142 if (!$exp->handleCommand()) {
143 return "<div id='tree_div'>" . $exp->getHTML() .
"</div>";
154 $this->tpl->setVariable(
"FCOLSPAN", $this->
getColSpan());
155 if ($this->tpl->blockExists(
"block_footer")) {
156 $this->tpl->setCurrentBlock(
"block_footer");
157 $this->tpl->parseCurrentBlock();
170 if ($this->num_bookmarks == 0 && $this->num_folders == 0) {
177 $ilCtrl->getLinkTarget($this,
"setPdFlatMode"),
187 (
$ilUser->getPref(
"il_pd_bkm_mode") !=
'tree')
201 (
$ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
214 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
218 $sess_cur_bm_folder =
"";
220 $sess_cur_bm_folder =
$_SESSION[
"ilCurBMFolder"];
235 "alt" =>
$lng->txt(
"bmf"),
237 "link" =>
$ilCtrl->getLinkTarget($this,
"setCurrentBookmarkFolder"));
242 foreach ($bm_items as $bm_item) {
243 switch ($bm_item[
"type"]) {
245 $ilCtrl->setParameter($this,
"curBMFolder", $bm_item[
"obj_id"]);
248 "alt" =>
$lng->txt(
"bmf"),
251 "link" =>
$ilCtrl->getLinkTarget(
253 "setCurrentBookmarkFolder" 261 "alt" =>
$lng->txt(
"bm"),
266 "target" =>
"_blank");
281 $this->tpl->setVariable(
"IMG_BM", $a_set[
"img"]);
282 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"alt"]);
283 $this->tpl->setVariable(
"BM_TITLE", $a_set[
"title"]);
284 $this->tpl->setVariable(
"BM_LINK", $a_set[
"link"]);
286 if (isset($a_set[
'rel'])) {
287 $this->tpl->setVariable(
"BM_REL", $a_set[
'rel']);
306 return '<div class="small">' . $this->num_bookmarks .
" " .
$lng->txt(
"bm_num_bookmarks") .
", " .
307 $this->num_folders .
" " .
$lng->txt(
"bm_num_bookmark_folders") .
"</div>";
318 $ilUser->writePref(
"il_pd_bkm_mode",
'flat');
323 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
335 $ilUser->writePref(
"il_pd_bkm_mode",
'tree');
340 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
352 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
fillRow($a_set)
get flat bookmark list for personal desktop
static _getParentId($a_id)
BlockGUI class for Bookmarks block.
static _getNumberOfObjects()
Get number of folders and bookmarks for current user.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setFooterLinks()
Set footer links.
static isRootFolder($a_id)
executeCommand()
execute command
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
static _lookupTitle($a_bmf_id)
lookup bookmark folder title
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
setCurrentBookmarkFolder()
set current bookmarkfolder on personal desktop
Bookmark block explorer GUI class.
static getBlockType()
Get block type.
setColSpan($a_colspan)
Set Columns Span.
static isRepositoryObject()
Is block used in repository object?
getOverview()
Get overview.
setImage($a_image)
Set Image.
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.
setTitle($a_title)
Set Title.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setData($a_data)
Set Data.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
__construct()
Constructor.
Create styles array
The data for the language used.
getPDBookmarkListHTMLTree()
get tree bookmark list for personal desktop
setPdFlatMode()
set current desktop view mode to flat
getListRowData()
Get list data (for flat list).
setLimit($a_limit)
Set Limit.
fillDataSection()
Fill data section.
getColSpan()
Get Columns Span.
setPdTreeMode()
set current desktop view mode to tree
This class represents a block method of a block.
static getObjects($a_id)
static
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
static getScreenMode()
Get Screen Mode for current command.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
getCurrentDetailLevel()
Get Current Detail Level.