5include_once(
"Services/Block/classes/class.ilBlockGUI.php");
 
    6include_once 
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
 
    7require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
 
   65        $this->rbacsystem = 
$DIC->rbac()->system();
 
   67        $this->obj_definition = 
$DIC[
"objDefinition"];
 
   68        $this->access = 
$DIC->access();
 
   70        parent::__construct();
 
   72        $this->lng  = 
$DIC->language();
 
   73        $this->ctrl = 
$DIC->ctrl();
 
   74        $this->
user = $DIC->user();
 
   76        $this->lng->loadLanguageModule(
'pd');
 
   77        $this->lng->loadLanguageModule(
'cntr'); 
 
   82        $this->allow_moving = 
false;
 
   92        require_once 
'Services/PersonalDesktop/ItemsBlock/classes/class.ilPDSelectedItemsBlockViewSettings.php';
 
   94        $this->viewSettings->parse();
 
   96        require_once 
'Services/PersonalDesktop/ItemsBlock/classes/class.ilPDSelectedItemsBlockViewGUI.php';
 
   99        $_GET[
'view'] = $this->viewSettings->getCurrentView();
 
  100        $this->ctrl->saveParameter($this, 
'view');
 
  125        parent::fillDetailRow();
 
  134        include_once 
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
 
  137        $this->ctrl->setParameterByClass(
'ilpersonaldesktopgui', 
'view', $this->viewSettings->getCurrentView());
 
  138        $this->ctrl->redirectByClass(
'ilpersonaldesktopgui', 
'show');
 
  146        include_once 
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
 
  149        $this->ctrl->setParameterByClass(
'ilpersonaldesktopgui', 
'view', $this->viewSettings->getCurrentView());
 
  150        $this->ctrl->redirectByClass(
'ilpersonaldesktopgui', 
'show');
 
  167        if ($cmd == 
'post') {
 
  169            $cmd = array_shift(array_keys($cmd));
 
  173            case 'confirmRemove':
 
  197        $DIC->database()->useSlave(
true);
 
  200        $this->
setData(array(
'dummy'));
 
  202        require_once 
'Services/Object/classes/class.ilObjectListGUI.php';
 
  203        ilObjectListGUI::prepareJSLinks(
 
  205            $this->ctrl->getLinkTargetByClass(array(
'ilcommonactiondispatchergui', 
'ilnotegui'), 
'', 
'', 
true, 
false),
 
  206            $this->ctrl->getLinkTargetByClass(array(
'ilcommonactiondispatchergui', 
'iltagginggui'), 
'', 
'', 
true, 
false)
 
  210        $this->
setTitle($this->view->getTitle());
 
  218        $this->ctrl->clearParameters($this);
 
  220        $DIC->database()->useSlave(
false);
 
  222        return parent::getHTML();
 
  230        if ($this->viewSettings->isStudyProgrammeViewActive()) {
 
  234        return parent::getFooterLinks();
 
  242        $next_class = $this->ctrl->getNextClass();
 
  243        $cmd        = $this->ctrl->getCmd(
'getHTML');
 
  245        switch ($next_class) {
 
  246            case 'ilcommonactiondispatchergui':
 
  247                include_once(
'Services/Object/classes/class.ilCommonActionDispatcherGUI.php');
 
  249                $this->ctrl->forwardCommand($gui);
 
  253                if (method_exists($this, $cmd)) {
 
  254                    return $this->$cmd();
 
  256                    return $this->{$cmd . 
'Object'}();
 
  285            $this->tpl->setVariable(
'BLOCK_ROW', $this->
getContent());
 
  297        $this->tpl->setVariable(
'FCOLSPAN', $this->
getColSpan());
 
  298        if ($this->tpl->blockExists(
'block_footer')) {
 
  299            $this->tpl->setCurrentBlock(
'block_footer');
 
  300            $this->tpl->parseCurrentBlock();
 
  319            $this->lng->txt(
"pd_sort_by_type"),
 
  320            $this->ctrl->getLinkTarget($this, 
"orderPDItemsByType"),
 
  321            $this->ctrl->getLinkTarget($this, 
"orderPDItemsByType", 
"", 
true),
 
  322            "block_" . $this->getBlockType() . 
"_" . $this->block_id,
 
  325            $this->viewSettings->isSortedByType()
 
  329            $this->lng->txt(
"pd_sort_by_location"),
 
  330            $this->ctrl->getLinkTarget($this, 
"orderPDItemsByLocation"),
 
  331            $this->ctrl->getLinkTarget($this, 
"orderPDItemsByLocation", 
"", 
true),
 
  332            "block_" . $this->getBlockType() . 
"_" . $this->block_id,
 
  335            $this->viewSettings->isSortedByLocation()
 
  338        if ($this->viewSettings->isMembershipsViewActive()) {
 
  340                $this->lng->txt(
"pd_sort_by_start_date"),
 
  341                $this->ctrl->getLinkTarget($this, 
"orderPDItemsByStartDate"),
 
  342                $this->ctrl->getLinkTarget($this, 
"orderPDItemsByStartDate", 
"", 
true),
 
  343                "block_" . $this->getBlockType() . 
"_" . $this->block_id,
 
  346                $this->viewSettings->isSortedByStartDate()
 
  351            $this->viewSettings->isSelectedItemsViewActive() ?
 
  352            $this->lng->txt(
"pd_remove_multiple") :
 
  353            $this->lng->txt(
"pd_unsubscribe_multiple_memberships"),
 
  354            $this->ctrl->getLinkTarget($this, 
"manage"),
 
  356            "block_" . $this->getBlockType() . 
"_" . $this->block_id
 
  366    protected function renderGroupedItems(
ilTemplate $tpl, array $grouped_items, $show_header = 
false)
 
  371        if (0 == count($grouped_items)) {
 
  377        require_once 
'Services/Object/classes/class.ilObjectActivation.php';
 
  378        require_once 
'Services/PersonalDesktop/ItemsBlock/classes/class.ilPDSelectedItemsBlockListGUIFactory.php';
 
  381        foreach ($grouped_items as $group) {
 
  382            $item_html = array();
 
  384            foreach ($group->getItems() as $item) {
 
  386                    $item_list_gui = $list_factory->byType($item[
'type']);
 
  391                        if ($this->view->mayRemoveItem((
int) $item[
'ref_id'])) {
 
  392                            $item_list_gui->enableCheckbox(
true);
 
  394                            $item_list_gui->enableCheckbox(
false);
 
  398                    $html = $item_list_gui->getListItemHTML($item[
'ref_id'], $item[
'obj_id'], $item[
'title'], $item[
'description']);
 
  400                        $item_html[] = array(
 
  402                            'item_ref_id'          => $item[
'ref_id'],
 
  403                            'item_obj_id'          => $item[
'obj_id'],
 
  404                            'parent_ref'           => $item[
'parent_ref'],
 
  405                            'type'                 => $item[
'type'],
 
  406                            'item_icon_image_type' => $item_list_gui->getIconImageType()
 
  414            if (0 == count($item_html)) {
 
  423            foreach ($item_html as $item) {
 
  427                    $item[
'item_ref_id'],
 
  428                    $item[
'item_obj_id'],
 
  429                    $item[
'item_icon_image_type'],
 
  430                    'th_' . md5($group->getLabel())
 
  446        $this->renderGroupedItems(
 
  448            $this->view->getItemGroups(),
 
  449            ($this->getCurrentDetailLevel() >= $this->view->getMinimumDetailLevelForSection())
 
  452        if ($this->manage && $this->view->supportsSelectAll()) {
 
  454            $tpl->setCurrentBlock(
'select_all_row');
 
  455            $tpl->setVariable(
'CHECKBOXNAME', 
'ilToolbarSelectAll');
 
  456            $tpl->setVariable(
'SEL_ALL_PARENT', 
'ilToolbar');
 
  457            $tpl->setVariable(
'SEL_ALL_CB_NAME', 
'id');
 
  458            $tpl->setVariable(
'TXT_SELECT_ALL', $this->lng->txt(
'select_all'));
 
  459            $tpl->parseCurrentBlock();
 
  467        $this->cur_row_type = 
"";
 
  478        $tpl = 
new ilTemplate(
"tpl.pd_list_block.html", 
true, 
true, 
"Services/PersonalDesktop");
 
  479        $this->cur_row_type = 
"";
 
  519        $a_related_header = 
"" 
  523        $this->cur_row_type = ($this->cur_row_type == 
"row_type_1")
 
  526        $a_tpl->touchBlock($this->cur_row_type);
 
  528        if ($a_image_type != 
"") {
 
  529            if (!is_array($a_image_type) && !in_array($a_image_type, array(
"lm", 
"htlm", 
"sahs"))) {
 
  531                $title = $this->lng->txt(
"obj_" . $a_image_type);
 
  534                $title = $this->lng->txt(
"learning_resource");
 
  539            in_array($a_image_type, array(
"cat",
"grp",
"crs"))) {
 
  540                require_once(
"./Services/Container/classes/class.ilContainer.php");
 
  546            $a_tpl->setCurrentBlock(
"block_row_image");
 
  547            $a_tpl->setVariable(
"ROW_IMG", $icon);
 
  548            $a_tpl->setVariable(
"ROW_ALT", 
$title);
 
  549            $a_tpl->parseCurrentBlock();
 
  551            $a_tpl->setVariable(
"ROW_NBSP", 
" ");
 
  553        $a_tpl->setCurrentBlock(
"container_standard_row");
 
  554        $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
 
  555        $rel_headers = ($a_related_header != 
"")
 
  556        ? 
"th_selected_items " . $a_related_header
 
  557        : 
"th_selected_items";
 
  558        $a_tpl->setVariable(
"BLOCK_ROW_HEADERS", $rel_headers);
 
  559        $a_tpl->parseCurrentBlock();
 
  560        $a_tpl->touchBlock(
"container_row");
 
  568        $this->
user->writePref(
'pd_order_items', $sort_type);
 
  571        if ($this->ctrl->isAsynch()) {
 
  576        $this->ctrl->setParameterByClass(
'ilpersonaldesktopgui', 
'view', $this->viewSettings->getCurrentView());
 
  577        $this->ctrl->redirectByClass(
'ilpersonaldesktopgui', 
'show');
 
  585        $this->
changeSortMode($this->viewSettings->getSortByLocationMode());
 
  601        $this->
changeSortMode($this->viewSettings->getSortByStartDateMode());
 
  609        $this->manage = 
true;
 
  613        $top_tb->setFormAction(
$ilCtrl->getFormAction($this));
 
  617        if ($this->viewSettings->isSelectedItemsViewActive()) {
 
  618            $button->setCaption(
"remove");
 
  620            $button->setCaption(
"pd_unsubscribe_memberships");
 
  622        $button->setCommand(
"confirmRemove");
 
  623        $top_tb->addStickyItem($button);
 
  626        $button2->setCaption(
"cancel");
 
  627        $button2->setCommand(
"getHTML");
 
  628        $top_tb->addStickyItem($button2);
 
  630        $top_tb->setCloseFormTag(
false);
 
  634        $bot_tb->addStickyItem($button);
 
  635        $bot_tb->addStickyItem($button2);
 
  636        $bot_tb->setOpenFormTag(
false);
 
  637        return $top_tb->getHTML() . $this->
getHTML() . $bot_tb->getHTML();
 
  644        $ilCtrl->setParameter($this, 
'view', $this->viewSettings->getCurrentView());
 
  645        if (!
sizeof(
$_POST[
"id"])) {
 
  647            $ilCtrl->redirect($this, 
"manage");
 
  650        if ($this->viewSettings->isSelectedItemsViewActive()) {
 
  651            $question = $this->lng->txt(
"pd_info_delete_sure_remove");
 
  652            $cmd = 
"confirmedRemove";
 
  654            $question = $this->lng->txt(
"pd_info_delete_sure_unsubscribe");
 
  655            $cmd = 
"confirmedUnsubscribe";
 
  658        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  660        $cgui->setHeaderText($question);
 
  662        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  663        $cgui->setCancel($this->lng->txt(
"cancel"), 
"manage");
 
  664        $cgui->setConfirm($this->lng->txt(
"confirm"), $cmd);
 
  666        foreach (
$_POST[
"id"] as $ref_id) {
 
  676                $this->lng->txt(
"icon") . 
" " . $this->lng->txt(
"obj_" . 
$type)
 
  680        return $cgui->getHTML();
 
  688        if (!
sizeof(
$_POST[
"ref_id"])) {
 
  689            $ilCtrl->redirect($this, 
"manage");
 
  692        foreach (
$_POST[
"ref_id"] as $ref_id) {
 
  699        $ilCtrl->setParameterByClass(
'ilpersonaldesktopgui', 
'view', $this->viewSettings->getCurrentView());
 
  700        $ilCtrl->redirectByClass(
"ilpersonaldesktopgui", 
"show");
 
  709        if (!
sizeof(
$_POST[
"ref_id"])) {
 
  710            $ilCtrl->redirect($this, 
"manage");
 
  713        foreach (
$_POST[
"ref_id"] as $ref_id) {
 
  714            if ($ilAccess->checkAccess(
"leave", 
"", $ref_id)) {
 
  718                        include_once 
"Modules/Course/classes/class.ilCourseParticipants.php";
 
  720                        $members->delete(
$ilUser->getId());
 
  722                        $members->sendUnsubscribeNotificationToAdmins(
$ilUser->getId());
 
  723                        $members->sendNotification(
 
  724                            $members->NOTIFY_UNSUBSCRIBE,
 
  731                        include_once 
"Modules/Group/classes/class.ilGroupParticipants.php";
 
  733                        $members->delete(
$ilUser->getId());
 
  735                        include_once 
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
 
  736                        $members->sendNotification(
 
  740                        $members->sendNotification(
 
  751                include_once 
'./Modules/Forum/classes/class.ilForumNotification.php';
 
  758        $ilCtrl->setParameterByClass(
'ilpersonaldesktopgui', 
'view', $this->viewSettings->getCurrentView());
 
  759        $ilCtrl->redirectByClass(
"ilpersonaldesktopgui", 
"show");
 
An exception for terminatinating execution or to throw for unit testing.
setVariable($variable, $value='')
Sets a variable value.
This class represents a block method of a block.
setLimit($a_limit)
Set Limit.
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.
setTitle($a_title)
Set Title.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
getColSpan()
Get Columns Span.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
static _lookupIconPath($a_id, $a_size="big")
lookup icon path
static addToDesktop()
Add desktop item @access public.
static removeFromDesktop()
Remove item from personal desktop @access public.
Base class for ILIAS Exception handling.
static checkForumsExistsDelete($ref_id, $user_id=0)
const TYPE_UNSUBSCRIBE_MEMBER
const TYPE_NOTIFICATION_UNSUBSCRIBE
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupType($a_id, $a_reference=false)
lookup object type
BlockGUI class for Selected Items on Personal Desktop.
addStandardRow(&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="", $a_related_header="")
adds a standard row to a block template
removeFromDeskObject()
Remove from desktop @access public.
getViewBlockHtml()
get selected item block
changeSortMode($sort_type)
fillDetailRow()
Fill Detail Setting Row.
addSectionHeader(ilTemplate $a_tpl, ilPDSelectedItemsBlockGroup $group)
orderPDItemsByType()
Sort desktop items by Type.
static isRepositoryObject()
__construct()
ilPDSelectedItemsBlockGUI constructor.
fillDataSection()
Standard implementation for row based data.Overwrite this and call setContent for other data.
orderPDItemsByLocation()
Sort desktop items by location.
getHTML()
Handle config status.Get HTML.
addToDeskObject()
Add desktop item @access public.
static getScreenMode()
Get Screen Mode for current command.
orderPDItemsByStartDate()
Sort desktop items by start date.
getFooterLinks()
Get footer links.
newBlockTemplate()
returns a new list block template
Class ilPDSelectedItemsBlockGroup.
Class ilPDSelectedItemsBlockListGUIFactory.
static bySettings(ilPDSelectedItemsBlockViewSettings $viewSettings)
Class ilPDSelectedItemsBlockViewSettings.
special template class to simplify handling of ITX/PEAR
touchBlock($block)
overwrites ITX::touchBlock.
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt @access public.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.