5include_once(
"Services/Block/classes/class.ilBlockGUI.php");
27 $this->ctrl =
$DIC->ctrl();
28 $this->lng =
$DIC->language();
29 $this->
user = $DIC->user();
32 parent::__construct();
40 $this->
id = (empty(
$_GET[
"bmf_id"]))
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"),
184 "block_" . $this->getBlockType() .
"_" . $this->block_id,
187 (
$ilUser->getPref(
"il_pd_bkm_mode") !=
'tree')
198 "block_" . $this->getBlockType() .
"_" . $this->block_id,
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");
An exception for terminatinating execution or to throw for unit testing.
This class represents a block method of a block.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setLimit($a_limit)
Set Limit.
setImage($a_image)
Set Image.
getCurrentDetailLevel()
Get Current Detail Level.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
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.
setData($a_data)
Set Data.
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setColSpan($a_colspan)
Set Columns Span.
setTitle($a_title)
Set Title.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
getColSpan()
Get Columns Span.
Bookmark block explorer GUI class.
BlockGUI class for Bookmarks block.
setFooterLinks()
Set footer links.
fillDataSection()
Fill data section.
setPdTreeMode()
set current desktop view mode to tree
getHTML()
Handle config status.
getListRowData()
Get list data (for flat list).
static isRepositoryObject()
Is block used in repository object?
fillRow($a_set)
get flat bookmark list for personal desktop
static getBlockType()
Get block type.
setCurrentBookmarkFolder()
set current bookmarkfolder on personal desktop
getOverview()
Get overview.
executeCommand()
execute command
getPDBookmarkListHTMLTree()
get tree bookmark list for personal desktop
setPdFlatMode()
set current desktop view mode to flat
__construct()
Constructor.
static getScreenMode()
Get Screen Mode for current command.
static _getNumberOfObjects()
Get number of folders and bookmarks for current user.
static _lookupTitle($a_bmf_id)
lookup bookmark folder title
static _getParentId($a_id)
static isRootFolder($a_id)
static getObjects($a_id)
static
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public