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"]))
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"),
180 "block_" . $this->getBlockType() .
"_" . $this->block_id,
183 (
$ilUser->getPref(
"il_pd_bkm_mode") !=
'tree')
194 "block_" . $this->getBlockType() .
"_" . $this->block_id,
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");
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).
fillRow($a_set)
get flat bookmark list for personal desktop
setCurrentBookmarkFolder()
set current bookmarkfolder on personal desktop
isRepositoryObject()
Returns whether block has a corresponding repository object.bool
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