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"]))
50 return self::$block_type;
67 switch (
$_GET[
"cmd"]) {
81 $next_class =
$ilCtrl->getNextClass();
82 $cmd =
$ilCtrl->getCmd(
"getHTML");
94 return parent::getHTML();
105 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
107 $this->num_bookmarks = $bm_items[
"bookmarks"];
108 $this->num_folders = $bm_items[
"folders"];
111 ($this->num_bookmarks > 0 || $this->num_folders > 0)) {
112 if (
$ilUser->getPref(
"il_pd_bkm_mode") ==
'tree') {
115 $this->
setRowTemplate(
"tpl.bookmark_pd_list.html",
"Services/Bookmarks");
118 parent::fillDataSection();
121 if ($this->num_bookmarks == 0 && $this->num_folders == 0) {
136 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkBlockExplorerGUI.php");
138 if (!$exp->handleCommand()) {
139 return "<div id='tree_div'>" . $exp->getHTML() .
"</div>";
150 $this->tpl->setVariable(
"FCOLSPAN", $this->
getColSpan());
151 if ($this->tpl->blockExists(
"block_footer")) {
152 $this->tpl->setCurrentBlock(
"block_footer");
153 $this->tpl->parseCurrentBlock();
166 if ($this->num_bookmarks == 0 && $this->num_folders == 0) {
173 $ilCtrl->getLinkTarget($this,
"setPdFlatMode"),
183 (
$ilUser->getPref(
"il_pd_bkm_mode") !=
'tree')
197 (
$ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
210 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
214 $sess_cur_bm_folder =
"";
216 $sess_cur_bm_folder =
$_SESSION[
"ilCurBMFolder"];
231 "alt" =>
$lng->txt(
"bmf"),
233 "link" =>
$ilCtrl->getLinkTarget($this,
"setCurrentBookmarkFolder"));
238 foreach ($bm_items as $bm_item) {
239 switch ($bm_item[
"type"]) {
241 $ilCtrl->setParameter($this,
"curBMFolder", $bm_item[
"obj_id"]);
244 "alt" =>
$lng->txt(
"bmf"),
247 "link" =>
$ilCtrl->getLinkTarget(
249 "setCurrentBookmarkFolder" 257 "alt" =>
$lng->txt(
"bm"),
262 "target" =>
"_blank");
277 $this->tpl->setVariable(
"IMG_BM", $a_set[
"img"]);
278 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"alt"]);
279 $this->tpl->setVariable(
"BM_TITLE", $a_set[
"title"]);
280 $this->tpl->setVariable(
"BM_LINK", $a_set[
"link"]);
282 if (isset($a_set[
'rel'])) {
283 $this->tpl->setVariable(
"BM_REL", $a_set[
'rel']);
302 return '<div class="small">' . $this->num_bookmarks .
" " .
$lng->txt(
"bm_num_bookmarks") .
", " .
303 $this->num_folders .
" " .
$lng->txt(
"bm_num_bookmark_folders") .
"</div>";
314 $ilUser->writePref(
"il_pd_bkm_mode",
'flat');
319 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
331 $ilUser->writePref(
"il_pd_bkm_mode",
'tree');
336 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
348 $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.
setColSpan($a_colspan)
Set Columns Span.
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.
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.