GUI class for personal bookmark administration.
More...
GUI class for personal bookmark administration.
It manages folders and bookmarks with the help of the two corresponding core classes ilBookmarkFolder and ilBookmark. Their methods are called in this User Interface class.
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
-
Manfred Thaler manfr.nosp@m.ed.t.nosp@m.haler.nosp@m.@end.nosp@m.o7.co.nosp@m.m
- Version
- $Id$
ilBookmarkAdministrationGUI:
Definition at line 19 of file class.ilBookmarkAdministrationGUI.php.
◆ __construct()
ilBookmarkAdministrationGUI::__construct |
( |
| ) |
|
Constructor public.
- Parameters
-
integer | user_id (optional) |
Definition at line 71 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $DIC, $ilCtrl, $ilUser, $lng, $tpl, and user().
75 $this->
user = $DIC->user();
76 $this->toolbar = $DIC->toolbar();
77 $this->error = $DIC[
"ilErr"];
78 $this->tabs = $DIC->tabs();
80 $lng = $DIC->language();
86 $tpl->getStandardTemplate();
90 $this->
id = (empty(
$_GET[
"bmf_id"]))
98 $this->ctrl->setParameter($this,
"bmf_id", $this->
id);
99 $this->user_id =
$ilUser->getId();
101 $this->tree =
new ilTree($this->user_id);
102 $this->tree->setTableNames(
'bookmark_tree',
'bookmark_data');
103 $this->root_id = $this->tree->readRootId();
105 $this->lng->loadLanguageModule(
"bkm");
107 $this->mode =
"tree";
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
◆ __importBookmarks()
ilBookmarkAdministrationGUI::__importBookmarks |
( |
& |
$objects, |
|
|
& |
$num_create, |
|
|
|
$folder_id, |
|
|
|
$start_key = 0 |
|
) |
| |
creates the bookmarks and folders
- Parameters
-
array | array of objects |
array | stores the number of created objects |
folder_id | id where to store the bookmarks |
start_key | key of the objects array where to start private |
Definition at line 970 of file class.ilBookmarkAdministrationGUI.php.
Referenced by importFile().
972 if (is_array($objects[$start_key])) {
973 foreach ($objects[$start_key] as $obj_key=> $object) {
974 switch ($object[
'type']) {
976 if (!$object[
"title"]) {
979 if (!$object[
"target"]) {
983 $bm->setTitle($object[
"title"]);
984 $bm->setDescription($object[
"description"]);
985 $bm->setTarget($object[
"target"]);
986 $bm->setParent($folder_id);
991 if (!$object[
"title"]) {
995 $bmf->setTitle($object[
"title"]);
996 $bmf->setParent($folder_id);
998 $num_create[
'bmf']++;
999 if (is_array($objects[$obj_key])) {
Class Bookmarks Bookmark management.
__importBookmarks(&$objects, &$num_create, $folder_id, $start_key=0)
creates the bookmarks and folders
bookmark folder (note: this class handles personal bookmarks folders only)
◆ add_cell()
ilBookmarkAdministrationGUI::add_cell |
( |
|
$val, |
|
|
|
$link = "" |
|
) |
| |
output a cell in object list
Definition at line 224 of file class.ilBookmarkAdministrationGUI.php.
227 $this->tpl->setCurrentBlock(
"begin_link");
228 $this->tpl->setVariable(
"LINK_TARGET", $link);
229 $this->tpl->parseCurrentBlock();
230 $this->tpl->touchBlock(
"end_link");
233 $this->tpl->setCurrentBlock(
"text");
234 $this->tpl->setVariable(
"TEXT_CONTENT", $val);
235 $this->tpl->parseCurrentBlock();
236 $this->tpl->setCurrentBlock(
"table_cell");
237 $this->tpl->parseCurrentBlock();
◆ cancel()
ilBookmarkAdministrationGUI::cancel |
( |
| ) |
|
◆ confirm()
ilBookmarkAdministrationGUI::confirm |
( |
| ) |
|
deletion confirmed -> delete folders / bookmarks
Definition at line 823 of file class.ilBookmarkAdministrationGUI.php.
References $_POST, $error, $id, $ilErr, $type, ilBookmark\_getTypeOfId(), ilUtil\sendSuccess(), and view().
829 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
837 if ($this->tree->isInTree($id)) {
838 $node_data = $this->tree->getNodeData($id);
839 $subtree_nodes = $this->tree->getSubTree($node_data);
845 $this->tree->deleteTree($node_data);
848 foreach ($subtree_nodes as $node) {
849 switch ($node[
"type"]) {
852 $BookmarkFolder->delete();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class Bookmarks Bookmark management.
static _getTypeOfId($a_id)
get type of a given id
bookmark folder (note: this class handles personal bookmarks folders only)
◆ confirmedMove()
ilBookmarkAdministrationGUI::confirmedMove |
( |
| ) |
|
Definition at line 1037 of file class.ilBookmarkAdministrationGUI.php.
References $ilUser, $tree, $user, ilUtil\sendFailure(), ilUtil\sendSuccess(), and view().
1041 $tgt = (int) $_REQUEST[
"bmfmv_id"];
1042 $bm_ids = explode(
";", $_REQUEST[
'bm_id_tgt']);
1043 if (!$bm_ids || !$tgt) {
1045 return $this->
view();
1049 $tree->setTableNames(
'bookmark_tree',
'bookmark_data');
1051 $tgt_node =
$tree->getNodeData($tgt);
1054 foreach ($bm_ids as $node_id) {
1055 if (
$tree->isGrandChild($node_id, $tgt)) {
1057 $this->ctrl->redirect($this,
"view");
1060 $node =
$tree->getNodeData($node_id);
1063 if ($node[
"parent"] == $tgt) {
1067 $tree->moveTree($node_id, $tgt);
1071 $this->ctrl->setParameter($this,
"bmf_id", $tgt);
1072 $this->ctrl->redirect($this,
"view");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ createBookmark()
ilBookmarkAdministrationGUI::createBookmark |
( |
| ) |
|
create new bookmark in db
Definition at line 622 of file class.ilBookmarkAdministrationGUI.php.
References $_POST, $ctrl, $ilCtrl, $lng, newFormBookmark(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\stripSlashes().
627 if (!$this->tree->isInTree($this->id)) {
628 $this->ctrl->setParameter($this,
'bmf_id',
'');
629 $this->ctrl->redirect($this);
633 if (empty(
$_POST[
"title"])) {
636 } elseif (empty(
$_POST[
"target"])) {
645 $bm->setParent($this->
id);
650 $ilCtrl->saveParameter($this,
'bmf_id');
651 $ilCtrl->redirect($this,
'view');
Class Bookmarks Bookmark management.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
newFormBookmark()
display new bookmark form
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ createBookmarkFolder()
ilBookmarkAdministrationGUI::createBookmarkFolder |
( |
| ) |
|
create new bookmark folder in db
Definition at line 564 of file class.ilBookmarkAdministrationGUI.php.
References $_POST, $ctrl, $ilCtrl, newFormBookmarkFolder(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().
566 if (!$this->tree->isInTree($this->id)) {
567 $this->ctrl->setParameter($this,
'bmf_id',
'');
568 $this->ctrl->redirect($this);
572 if (empty(
$_POST[
"title"])) {
579 $bmf->setParent($this->
id);
585 $ilCtrl->saveParameter($this,
'bmf_id');
586 $ilCtrl->redirect($this,
'view');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
bookmark folder (note: this class handles personal bookmarks folders only)
newFormBookmarkFolder()
display new bookmark folder form
◆ delete()
ilBookmarkAdministrationGUI::delete |
( |
| ) |
|
display deletion conformation screen
Definition at line 758 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $_POST, $error, $ilErr, $target, $title, $type, ilBookmark\_getTypeOfId(), array, ilUtil\getImageTagByType(), and ilUtil\shortenText().
764 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
767 $this->ctrl->setParameter($this,
"bmf_id", $this->
id);
770 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
772 $cgui->setFormAction($this->ctrl->getFormAction($this));
773 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
774 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
775 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirm");
777 foreach ($bm_ids as $obj_id) {
780 if (!$this->tree->isInTree($obj_id)) {
787 $title = $BookmarkFolder->getTitle();
789 unset($BookmarkFolder);
794 $title = $Bookmark->getTitle();
795 $target = $Bookmark->getTarget();
806 $cgui->addItem(
"id[]", $obj_id, $caption);
809 $this->tpl->setContent($cgui->getHTML());
Class Bookmarks Bookmark management.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
static _getTypeOfId($a_id)
get type of a given id
Create styles array
The data for the language used.
bookmark folder (note: this class handles personal bookmarks folders only)
Confirmation screen class.
◆ displayHeader()
ilBookmarkAdministrationGUI::displayHeader |
( |
| ) |
|
◆ displayLocator()
ilBookmarkAdministrationGUI::displayLocator |
( |
| ) |
|
display locator
Definition at line 243 of file class.ilBookmarkAdministrationGUI.php.
References $key, $lng, $path, $row, and $title.
Referenced by displayHeader().
247 if (empty($this->
id)) {
251 if (!$this->tree->isInTree($this->id)) {
255 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
257 $path = $this->tree->getPathFull($this->
id);
262 $this->tpl->setVariable(
"TXT_LOCATOR", $this->lng->txt(
"locator"));
263 $this->tpl->touchBlock(
"locator_separator");
264 $this->tpl->touchBlock(
"locator_item");
274 $this->tpl->touchBlock(
"locator_separator");
277 $this->tpl->setCurrentBlock(
"locator_item");
279 $lng->txt(
"bookmarks") :
281 $this->tpl->setVariable(
"ITEM",
$title);
282 $this->ctrl->setParameter($this,
"bmf_id",
$row[
"child"]);
283 $this->tpl->setVariable(
285 $this->ctrl->getLinkTarget($this)
287 $this->tpl->parseCurrentBlock();
290 $this->tpl->setCurrentBlock(
"locator");
292 $this->tpl->parseCurrentBlock();
◆ editFormBookmark()
ilBookmarkAdministrationGUI::editFormBookmark |
( |
| ) |
|
display edit bookmark form
Definition at line 536 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $ctrl, $form, $ilCtrl, $lng, array, and initFormBookmark().
Referenced by updateBookmark().
541 if (!$this->tree->isInTree(
$_GET[
"obj_id"])) {
542 $this->ctrl->setParameter($this,
'obj_id',
'');
543 $this->ctrl->setParameter($this,
'bmf_id',
'');
544 $this->ctrl->redirect($this);
549 $form->setValuesByArray(
551 "title" => $bookmark->getTitle(),
552 "target" => $bookmark->getTarget(),
553 "description" => $bookmark->getDescription(),
554 "obj_id" =>
$_GET[
"obj_id"],
557 $this->tpl->setVariable(
"ADM_CONTENT",
$form->getHTML());
Class Bookmarks Bookmark management.
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
initFormBookmark($action='createBookmark')
init Bookmark create/edit form
◆ editFormBookmarkFolder()
ilBookmarkAdministrationGUI::editFormBookmarkFolder |
( |
| ) |
|
display edit bookmark folder form
Definition at line 376 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $form, array, get_last(), and initFormBookmarkFolder().
Referenced by updateBookmarkFolder().
378 if (!$this->tree->isInTree(
$_GET[
"obj_id"])) {
379 $this->ctrl->setParameter($this,
'bmf_id',
'');
380 $this->ctrl->setParameter($this,
'obj_id',
'');
381 $this->ctrl->redirect($this);
386 $form->setValuesByArray(
388 "title" => $this->
get_last(
"title", $bmf->getTitle()),
389 "obj_id" =>
$_GET[
"obj_id"],
392 $this->tpl->setVariable(
"ADM_CONTENT",
$form->getHTML());
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
initFormBookmarkFolder($action='createBookmarkFolder')
init bookmark folder create/edit form
bookmark folder (note: this class handles personal bookmarks folders only)
get_last($a_var, $a_value)
get stored post var in case of an error/warning otherwise return passed value
◆ executeAction()
ilBookmarkAdministrationGUI::executeAction |
( |
| ) |
|
◆ executeCommand()
ilBookmarkAdministrationGUI::executeCommand |
( |
| ) |
|
execute command
Definition at line 113 of file class.ilBookmarkAdministrationGUI.php.
References displayHeader(), explorer(), and getMode().
115 $next_class = $this->ctrl->getNextClass();
117 switch ($next_class) {
119 $cmd = $this->ctrl->getCmd(
"view");
122 if ($this->
getMode() ==
'tree') {
127 $this->tpl->show(
true);
displayHeader()
display header and locator
getMode()
return display mode flat or tree
explorer()
output explorer tree with bookmark folders
◆ explorer()
ilBookmarkAdministrationGUI::explorer |
( |
| ) |
|
output explorer tree with bookmark folders
Definition at line 162 of file class.ilBookmarkAdministrationGUI.php.
References $tpl.
Referenced by executeCommand().
166 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkExplorerGUI.php");
168 if (!$exp->handleCommand()) {
169 $tpl->setLeftNavContent($exp->getHTML());
Bookmark explorer GUI class.
◆ export()
ilBookmarkAdministrationGUI::export |
( |
|
$deliver = true | ) |
|
export bookmarks
Definition at line 688 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $_POST, $error, $id, $ilErr, $ilUser, $user, ilBookmarkImportExport\_exportBookmark(), array, and ilUtil\deliverData().
Referenced by executeAction(), and sendmail().
695 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
697 $export_ids =
array();
698 foreach ($bm_ids as
$id) {
699 if ($this->tree->isInTree($id)) {
706 require_once(
"./Services/Bookmarks/classes/class.ilBookmarkImportExport.php");
710 $this->lng->txt(
"bookmarks_of") .
" " .
$ilUser->getFullname()
716 return $html_content;
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
Create styles array
The data for the language used.
static _exportBookmark($obj_ids, $recursive=true, $title='')
export bookmarks static method return html string
◆ get_last()
ilBookmarkAdministrationGUI::get_last |
( |
|
$a_var, |
|
|
|
$a_value |
|
) |
| |
◆ getHTML()
ilBookmarkAdministrationGUI::getHTML |
( |
| ) |
|
Get Bookmark list for personal desktop.
Definition at line 917 of file class.ilBookmarkAdministrationGUI.php.
919 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkBlockGUI.php");
922 return $bookmark_block_gui->getHTML();
BlockGUI class for Bookmarks block.
◆ getMode()
ilBookmarkAdministrationGUI::getMode |
( |
| ) |
|
◆ importFile()
ilBookmarkAdministrationGUI::importFile |
( |
| ) |
|
imports a bookmark file into database display status information or report errors messages in case of error public
Definition at line 931 of file class.ilBookmarkAdministrationGUI.php.
References __importBookmarks(), ilBookmarkImportExport\_parseFile(), array, newFormBookmark(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and view().
933 if (!$this->tree->isInTree($this->id)) {
934 $this->ctrl->setParameter($this,
'bmf_id',
'');
935 $this->ctrl->redirect($this);
938 if ($_FILES[
"bkmfile"][
"error"] > UPLOAD_ERR_OK) {
943 require_once(
"./Services/Bookmarks/classes/class.ilBookmarkImportExport.php");
945 if ($objects ===
false) {
951 $num_create =
array(
'bm'=> 0,
'bmf'=> 0);
955 $this->lng->txt(
"bkm_import_ok"),
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
__importBookmarks(&$objects, &$num_create, $folder_id, $start_key=0)
creates the bookmarks and folders
newFormBookmark()
display new bookmark form
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _parseFile($file)
parse Bookmark file static method returns 3 dimensional array of bookmarks and folders ...
◆ initFormBookmark()
ilBookmarkAdministrationGUI::initFormBookmark |
( |
|
$action = 'createBookmark' | ) |
|
|
private |
init Bookmark create/edit form
- Parameters
-
string | form action type; valid values: createBookmark, updateBookmark |
Definition at line 400 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $action, $ctrl, $form, $ilCtrl, $ilUser, $lng, $user, and ilTextInputGUI\setValue().
Referenced by editFormBookmark(), and newFormBookmark().
406 if (!$this->tree->isInTree($this->id)) {
407 $this->ctrl->setParameter($this,
'bmf_id',
'');
408 $this->ctrl->redirect($this);
411 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
413 $form->setTopAnchor(
"bookmark_top");
415 $form->setTitle(
$lng->txt(
"bookmark_new"));
417 if (
$action ==
'updateBookmark') {
418 $ilCtrl->setParameter($this,
'bmf_id', $this->
id);
419 $ilCtrl->setParameter($this,
'obj_id',
$_GET[
"obj_id"]);
422 $hash = (
$ilUser->prefs[
"screen_reader_optimization"])
427 $ilCtrl->clearParameters($this);
431 $prop->setRequired(
true);
432 $form->addItem($prop);
436 $form->addItem($prop);
441 $prop->setRequired(
true);
442 $form->addItem($prop);
445 if (
$_GET[
'return_to']) {
447 $prop->setValue(
$_GET[
'return_to']);
448 $form->addItem($prop);
451 if (
$_GET[
'return_to_url']) {
452 $prop->setValue(
$_GET[
'return_to_url']);
454 $prop->setValue(
$_GET[
'bm_link']);
456 $form->addItem($prop);
461 $form->addCommandButton(
'cancel',
$lng->txt(
'cancel'));
if(isset($_POST['submit'])) $form
This class represents a text property in a property form.
This class represents a text area property in a property form.
setValue($a_value)
Set Value.
◆ initFormBookmarkFolder()
init bookmark folder create/edit form
- Parameters
-
string | form action type; valid values: createBookmark, updateBookmark |
Definition at line 332 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $action, $ctrl, $form, $ilCtrl, $ilUser, $lng, $user, and ilFormPropertyGUI\setRequired().
Referenced by editFormBookmarkFolder(), and newFormBookmarkFolder().
338 if (!$this->tree->isInTree($this->id)) {
339 $this->ctrl->setParameter($this,
'bmf_id',
'');
340 $this->ctrl->redirect($this);
343 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
345 $form->setTopAnchor(
"bookmark_top");
347 $form->setTitle(
$lng->txt(
"bookmark_folder_new"));
349 if (
$action ==
'updateBookmarkFolder') {
350 $ilCtrl->setParameter($this,
'bmf_id', $this->
id);
351 $ilCtrl->setParameter($this,
'obj_id',
$_GET[
"obj_id"]);
354 $hash = (
$ilUser->prefs[
"screen_reader_optimization"])
360 $ilCtrl->clearParameters($this);
365 $form->addItem($prop);
369 $form->addCommandButton(
'cancel',
$lng->txt(
'cancel'));
if(isset($_POST['submit'])) $form
This class represents a text property in a property form.
◆ initImportBookmarksForm()
ilBookmarkAdministrationGUI::initImportBookmarksForm |
( |
| ) |
|
|
private |
Init import bookmark form.
Definition at line 480 of file class.ilBookmarkAdministrationGUI.php.
References $ctrl, $form, $ilCtrl, $ilUser, $lng, $user, and ilFormPropertyGUI\setRequired().
Referenced by newFormBookmark().
486 if (!$this->tree->isInTree($this->id)) {
487 $this->ctrl->setParameter($this,
'bmf_id',
'');
488 $this->ctrl->redirect($this);
491 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
493 $form->setFormAction(
$ilCtrl->getFormAction($this,
"importFile"));
494 $form->setTopAnchor(
"bookmark_top");
495 $form->setTitle(
$lng->txt(
"bkm_import"));
501 $form->addCommandButton(
"importFile",
$lng->txt(
'import'));
502 $form->addCommandButton(
'cancel',
$lng->txt(
'cancel'));
if(isset($_POST['submit'])) $form
◆ move()
ilBookmarkAdministrationGUI::move |
( |
| ) |
|
Definition at line 1013 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $ilUser, $tabs, $tpl, $user, ilUtil\sendFailure(), ilUtil\sendInfo(), and view().
1019 $bm_ids = $_REQUEST[
'bm_id'];
1020 if (!$bm_ids &&
$_GET[
"bm_id_tgt"] ==
"") {
1022 return $this->
view();
1025 $ilTabs->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
1027 $this->ctrl->setParameter($this,
"bm_id_tgt",
$_GET[
"bm_id_tgt"] ?
$_GET[
"bm_id_tgt"] : implode(
";", $bm_ids));
1029 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkMoveExplorerGUI.php");
1031 if (!$exp->handleCommand()) {
1032 $this->mode =
"flat";
1033 $this->tpl->setContent($exp->getHTML());
Bookmark explorer GUI class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ newForm()
ilBookmarkAdministrationGUI::newForm |
( |
|
$type | ) |
|
◆ newFormBookmark()
ilBookmarkAdministrationGUI::newFormBookmark |
( |
| ) |
|
◆ newFormBookmarkFolder()
ilBookmarkAdministrationGUI::newFormBookmarkFolder |
( |
| ) |
|
◆ sendmail()
ilBookmarkAdministrationGUI::sendmail |
( |
| ) |
|
send bookmarks as attachment
Definition at line 723 of file class.ilBookmarkAdministrationGUI.php.
References $filename, $ilUser, $user, array, export(), ilMailFormCall\getRedirectTarget(), ilUtil\ilTempnam(), and ilUtil\redirect().
Referenced by executeAction().
726 include_once
'./Services/Mail/classes/class.ilFileDataMail.php';
727 require_once
"Services/Mail/classes/class.ilFormatMail.php";
731 $html_content = $this->
export(
false);
733 $fp = fopen($tempfile,
'w');
734 fwrite($fp, $html_content);
737 $mfile->copyAttachmentFile($tempfile,
$filename);
738 $umail->savePostData(
751 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
This class handles all operations on files (attachments) in directory ilias_data/mail.
export($deliver=true)
export bookmarks
Create styles array
The data for the language used.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
static redirect($a_script)
◆ showPossibleSubObjects()
ilBookmarkAdministrationGUI::showPossibleSubObjects |
( |
| ) |
|
display subobject addition selection
Definition at line 873 of file class.ilBookmarkAdministrationGUI.php.
References $_SESSION, array, and ilUtil\formSelect().
876 "delete" => $this->lng->txt(
"delete"),
877 "export" => $this->lng->txt(
"export"),
878 "sendmail"=> $this->lng->txt(
"bkm_sendmail"),
881 $subobj =
array(
"bm",
"bmf");
883 if (is_array($subobj)) {
887 $this->tpl->setCurrentBlock(
"add_object");
888 $this->tpl->setVariable(
"COLUMN_COUNTS", 7);
889 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
890 $this->tpl->setVariable(
"BTN_NAME",
"newForm");
891 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
892 $this->tpl->parseCurrentBlock();
895 $this->tpl->setVariable(
"TPLPATH", $this->tpl->tplPath);
897 $this->tpl->setCurrentBlock(
"tbl_action_select");
898 $this->tpl->setVariable(
"SELECT_ACTION",
ilUtil::formSelect(
$_SESSION[
"error_post_vars"][
'action'],
"action", $actions,
false,
true));
899 $this->tpl->setVariable(
"BTN_NAME",
"executeAction");
900 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"execute"));
911 $this->tpl->parseCurrentBlock();
Create styles array
The data for the language used.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
◆ updateBookmark()
ilBookmarkAdministrationGUI::updateBookmark |
( |
| ) |
|
update bookmark in db
Definition at line 658 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $_POST, editFormBookmark(), ilUtil\sendFailure(), ilUtil\stripSlashes(), and view().
660 if (!$this->tree->isInTree(
$_GET[
"obj_id"])) {
661 $this->ctrl->setParameter($this,
'obj_id',
'');
662 $this->ctrl->setParameter($this,
'bmf_id',
'');
663 $this->ctrl->redirect($this);
667 if (empty(
$_POST[
"title"])) {
670 } elseif (empty(
$_POST[
"target"])) {
Class Bookmarks Bookmark management.
editFormBookmark()
display edit bookmark form
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ updateBookmarkFolder()
ilBookmarkAdministrationGUI::updateBookmarkFolder |
( |
| ) |
|
update bookmark folder
Definition at line 594 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $_POST, $ctrl, $ilCtrl, editFormBookmarkFolder(), ilUtil\sendFailure(), and ilUtil\stripSlashes().
596 if (!$this->tree->isInTree(
$_GET[
"obj_id"])) {
597 $this->ctrl->setParameter($this,
'obj_id',
'');
598 $this->ctrl->setParameter($this,
'bmf_id',
'');
599 $this->ctrl->redirect($this);
603 if (empty(
$_POST[
"title"])) {
613 $ilCtrl->saveParameter($this,
'bmf_id');
614 $ilCtrl->redirect($this,
'view');
editFormBookmarkFolder()
display edit bookmark folder form
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
bookmark folder (note: this class handles personal bookmarks folders only)
◆ view()
ilBookmarkAdministrationGUI::view |
( |
| ) |
|
Definition at line 194 of file class.ilBookmarkAdministrationGUI.php.
References $table, $toolbar, and ilBookmarkFolder\getObjects().
Referenced by cancel(), confirm(), confirmedMove(), executeAction(), importFile(), move(), and updateBookmark().
198 if ($this->
id > 0 && !$this->tree->isInTree($this->id)) {
199 $this->ctrl->setParameter($this,
'bmf_id',
'');
200 $this->ctrl->redirect($this);
203 $ilToolbar->addButton(
204 $this->lng->txt(
"bookmark_new"),
205 $this->ctrl->getLinkTarget($this,
"newFormBookmark")
207 $ilToolbar->addButton(
208 $this->lng->txt(
"bookmark_folder_new"),
209 $this->ctrl->getLinkTarget($this,
"newFormBookmarkFolder")
214 include_once
'Services/Bookmarks/classes/class.ilBookmarkAdministrationTableGUI.php';
216 $table->setId(
'bookmark_adm_table');
217 $table->setData($objects);
218 $this->tpl->setVariable(
"ADM_CONTENT",
$table->getHTML());
Table GUI for Bookmark management.
static getObjects($a_id)
static
if(empty($password)) $table
◆ $ctrl
ilBookmarkAdministrationGUI::$ctrl |
|
protected |
◆ $data
ilBookmarkAdministrationGUI::$data |
◆ $error
ilBookmarkAdministrationGUI::$error |
|
protected |
◆ $id
ilBookmarkAdministrationGUI::$id |
◆ $lng
ilBookmarkAdministrationGUI::$lng |
◆ $tabs
ilBookmarkAdministrationGUI::$tabs |
|
protected |
◆ $textwidth
ilBookmarkAdministrationGUI::$textwidth = 100 |
◆ $toolbar
ilBookmarkAdministrationGUI::$toolbar |
|
protected |
◆ $tpl
ilBookmarkAdministrationGUI::$tpl |
◆ $tree
ilBookmarkAdministrationGUI::$tree |
◆ $user
ilBookmarkAdministrationGUI::$user |
|
protected |
◆ $user_id
ilBookmarkAdministrationGUI::$user_id |
The documentation for this class was generated from the following file: