ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPDSelectedItemsBlockGUI Class Reference

BlockGUI class for Selected Items on Personal Desktop. More...

+ Inheritance diagram for ilPDSelectedItemsBlockGUI:
+ Collaboration diagram for ilPDSelectedItemsBlockGUI:

Public Member Functions

 __construct ()
 ilPDSelectedItemsBlockGUI constructor. More...
 
 getViewSettings ()
 
 isManagedView ()
 
 fillDetailRow ()
 
 addToDeskObject ()
 Add desktop item public. More...
 
 removeFromDeskObject ()
 Remove from desktop public. More...
 
 getHTML ()
 
 getFooterLinks ()
 
 executeCommand ()
 
 fillDataSection ()
 
 fillFooter ()
 
 newBlockTemplate ()
 returns a new list block template More...
 
 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 More...
 
 orderPDItemsByLocation ()
 Sort desktop items by location. More...
 
 orderPDItemsByType ()
 Sort desktop items by Type. More...
 
 orderPDItemsByStartDate ()
 Sort desktop items by start date. More...
 
 manageObject ()
 
 confirmRemoveObject ()
 
 confirmedRemove ()
 
 confirmedUnsubscribe ()
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 Constructor. More...
 
 addHeaderLink ($a_href, $a_text, $status=true)
 
 getHeaderLinks ()
 
 setData ($a_data)
 Set Data. More...
 
 getData ()
 Get Data. More...
 
 setBigMode ($a_bigmode)
 Set Big Mode. More...
 
 getBigMode ()
 Get Big Mode. More...
 
 setBlockId ($a_block_id=0)
 Set Block Id. More...
 
 getBlockId ()
 Get Block Id. More...
 
 setAvailableDetailLevels ($a_max, $a_min=0)
 Set Available Detail Levels. More...
 
 setCurrentDetailLevel ($a_currentdetaillevel)
 Set Current Detail Level. More...
 
 setGuiObject (&$a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 Get GuiObject. More...
 
 getCurrentDetailLevel ()
 Get Current Detail Level. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setImage ($a_image)
 Set Image. More...
 
 getImage ()
 Get Image. More...
 
 setOffset ($a_offset)
 Set Offset. More...
 
 getOffset ()
 Get Offset. More...
 
 correctOffset ()
 
 setLimit ($a_limit)
 Set Limit. More...
 
 getLimit ()
 Get Limit. More...
 
 setEnableEdit ($a_enableedit)
 Set EnableEdit. More...
 
 getEnableEdit ()
 Get EnableEdit. More...
 
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode. More...
 
 getRepositoryMode ()
 Get RepositoryMode. More...
 
 setFooterInfo ($a_footerinfo, $a_hide_and_icon=false)
 Set Footer Info. More...
 
 getFooterInfo ($a_hide_and_icon=false)
 Get Footer Info. More...
 
 setSubtitle ($a_subtitle)
 Set Subtitle. More...
 
 getSubtitle ()
 Get Subtitle. More...
 
 setRefId ($a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 Get Ref Id (only used if isRepositoryObject() is true). More...
 
 setAdminCommands ($a_admincommands)
 Set Administration Commmands. More...
 
 getAdminCommands ()
 Get Administration Commmands. More...
 
 setColSpan ($a_colspan)
 Set Columns Span. More...
 
 getColSpan ()
 Get Columns Span. More...
 
 setEnableDetailRow ($a_enabledetailrow)
 Set EnableDetailRow. More...
 
 getEnableDetailRow ()
 Get EnableDetailRow. More...
 
 setEnableNumInfo ($a_enablenuminfo)
 Set Enable Item Number Info. More...
 
 getEnableNumInfo ()
 Get Enable Item Number Info. More...
 
 setProperties ($a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty ($a_property)
 
 setProperty ($a_property, $a_value)
 
 setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getDetailParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 Get Row Template Name. More...
 
 getRowTemplateDir ()
 Get Row Template Directory. More...
 
 addBlockCommand ( $a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
 Add Block Command. More...
 
 getBlockCommands ()
 Get Block commands. More...
 
 addHeaderCommand ($a_href, $a_text, $a_as_close=false)
 Add Header Block Command. More...
 
 getHeaderCommands ()
 Get Header Block commands. More...
 
 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. More...
 
 getFooterLinks ()
 Get footer links. More...
 
 clearFooterLinks ()
 Clear footer links. More...
 
 handleDetailLevel ()
 Handle read/write current detail level. More...
 
 getHTML ()
 Handle config status. More...
 
 fillHeaderCommands ()
 Fill header commands block. More...
 
 fillHeaderTitleBlock ()
 Fill header title block (title and. More...
 
 setDataSection ($a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used. More...
 
 fillDataSection ()
 Standard implementation for row based data. More...
 
 fillRow ($a_set)
 
 fillFooter ()
 
 fillPreviousNext ()
 Fill previous/next row. More...
 
 setPreviousNextLinks ()
 Get previous/next linkbar. More...
 
 fillFooterLinks ($a_top=false, $a_numinfo="")
 Fill footer links. More...
 
 fillDetailRow ()
 Fill Detail Setting Row. More...
 

Static Public Member Functions

static getBlockType ()
 
static getScreenMode ()
 
static isRepositoryObject ()
 
- Static Public Member Functions inherited from ilBlockGUI
static getBlockType ()
 
static isRepositoryObject ()
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 

Static Public Attributes

static $block_type = 'pditems'
 

Protected Member Functions

 initViewSettings ()
 
 getContent ()
 
 setContent ($a_content)
 
 setFooterLinks ()
 
 getViewBlockHtml ()
 get selected item block More...
 
 resetRowType ()
 
 addSectionHeader (ilTemplate $a_tpl, ilPDSelectedItemsBlockGroup $group)
 
 changeSortMode ($sort_type)
 
- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 

Protected Attributes

 $rbacsystem
 
 $settings
 
 $obj_definition
 
 $viewSettings
 
 $view
 
 $manage = false
 
 $content = ''
 
 $lng
 
 $ctrl
 
 $user
 
- Protected Attributes inherited from ilBlockGUI
 $data = array()
 
 $colspan = 1
 
 $enablenuminfo = true
 
 $detail_min = 0
 
 $detail_max = 0
 
 $bigmode = false
 
 $footer_links = array()
 
 $block_id = 0
 
 $header_commands = array()
 
 $allow_moving = true
 
 $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
 $enabledetailrow = true
 
 $header_links = array()
 
 $footerinfo = false
 
 $footerinfo_icon = false
 
 $block_commands = array()
 
 $max_count = false
 
 $close_command = false
 
 $image = false
 
 $property = false
 
 $nav_value = ""
 
 $css_row = ""
 
 $dropdown
 
 $tpl
 
 $main_tpl
 
 $user
 
 $ctrl
 
 $access
 
 $lng
 
 $obj_def
 

Detailed Description

BlockGUI class for Selected Items on Personal Desktop.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilPDSelectedItemsBlockGUI: ilColumnGUI ilPDSelectedItemsBlockGUI: ilCommonActionDispatcherGUI

Definition at line 18 of file class.ilPDSelectedItemsBlockGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPDSelectedItemsBlockGUI::__construct ( )

ilPDSelectedItemsBlockGUI constructor.

Definition at line 62 of file class.ilPDSelectedItemsBlockGUI.php.

References $DIC, initViewSettings(), ilBlockGUI\setAvailableDetailLevels(), ilBlockGUI\setEnableNumInfo(), ilBlockGUI\setLimit(), settings(), and user().

63  {
64  global $DIC;
65  $this->rbacsystem = $DIC->rbac()->system();
66  $this->settings = $DIC->settings();
67  $this->obj_definition = $DIC["objDefinition"];
68  $this->access = $DIC->access();
69 
70  parent::__construct();
71 
72  $this->lng = $DIC->language();
73  $this->ctrl = $DIC->ctrl();
74  $this->user = $DIC->user();
75 
76  $this->lng->loadLanguageModule('pd');
77  $this->lng->loadLanguageModule('cntr'); // #14158
78 
79  $this->setEnableNumInfo(false);
80  $this->setLimit(99999);
81  $this->setAvailableDetailLevels(3, 1);
82  $this->allow_moving = false;
83 
84  $this->initViewSettings();
85  }
global $DIC
Definition: saml.php:7
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
user()
Definition: user.php:4
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setLimit($a_limit)
Set Limit.
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

Member Function Documentation

◆ addSectionHeader()

ilPDSelectedItemsBlockGUI::addSectionHeader ( ilTemplate  $a_tpl,
ilPDSelectedItemsBlockGroup  $group 
)
protected
Parameters
ilTemplate$a_tpl
ilPDSelectedItemsBlockGroup$group

Definition at line 487 of file class.ilPDSelectedItemsBlockGUI.php.

References ilPDSelectedItemsBlockGroup\getIconPath(), ilPDSelectedItemsBlockGroup\getLabel(), ilPDSelectedItemsBlockGroup\hasIcon(), ilTemplate\parseCurrentBlock(), resetRowType(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilTemplate\touchBlock().

Referenced by setFooterLinks().

488  {
489  if ($group->hasIcon()) {
490  $a_tpl->setCurrentBlock('container_header_row_image');
491  $a_tpl->setVariable('HEADER_IMG', $group->getIconPath());
492  $a_tpl->setVariable('HEADER_ALT', $group->getLabel());
493  } else {
494  $a_tpl->setCurrentBlock('container_header_row');
495  }
496 
497  $a_tpl->setVariable('BLOCK_HEADER_CONTENT', $group->getLabel());
498  $a_tpl->setVariable('BLOCK_HEADER_ID', 'th_' . md5($group->getLabel()));
499  $a_tpl->parseCurrentBlock();
500 
501  $a_tpl->touchBlock('container_row');
502 
503  $this->resetRowType();
504  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addStandardRow()

ilPDSelectedItemsBlockGUI::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

Parameters
object$a_tplblock template
string$a_htmlhtml code private

Definition at line 513 of file class.ilPDSelectedItemsBlockGUI.php.

References $ilSetting, $path, $settings, $title, ilContainer\_lookupIconPath(), array, and ilUtil\getImagePath().

Referenced by setFooterLinks().

520  {
522 
523  $this->cur_row_type = ($this->cur_row_type == "row_type_1")
524  ? "row_type_2"
525  : "row_type_1";
526  $a_tpl->touchBlock($this->cur_row_type);
527 
528  if ($a_image_type != "") {
529  if (!is_array($a_image_type) && !in_array($a_image_type, array("lm", "htlm", "sahs"))) {
530  $icon = ilUtil::getImagePath("icon_" . $a_image_type . ".svg");
531  $title = $this->lng->txt("obj_" . $a_image_type);
532  } else {
533  $icon = ilUtil::getImagePath("icon_lm.svg");
534  $title = $this->lng->txt("learning_resource");
535  }
536 
537  // custom icon
538  if ($ilSetting->get("custom_icons") &&
539  in_array($a_image_type, array("cat","grp","crs"))) {
540  require_once("./Services/Container/classes/class.ilContainer.php");
541  if (($path = ilContainer::_lookupIconPath($a_item_obj_id, "small")) != "") {
542  $icon = $path;
543  }
544  }
545 
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();
550  } else {
551  $a_tpl->setVariable("ROW_NBSP", " ");
552  }
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");
561  }
static _lookupIconPath($a_id, $a_size="big")
lookup icon path
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToDeskObject()

ilPDSelectedItemsBlockGUI::addToDeskObject ( )

Add desktop item public.

Implements ilDesktopItemHandling.

Definition at line 132 of file class.ilPDSelectedItemsBlockGUI.php.

References ilDesktopItemGUI\addToDesktop(), and ilUtil\sendSuccess().

133  {
134  include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
136  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
137  $this->ctrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
138  $this->ctrl->redirectByClass('ilpersonaldesktopgui', 'show');
139  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static addToDesktop()
Add desktop item public.
+ Here is the call graph for this function:

◆ changeSortMode()

ilPDSelectedItemsBlockGUI::changeSortMode (   $sort_type)
protected
Parameters
string$sort_type

Definition at line 566 of file class.ilPDSelectedItemsBlockGUI.php.

References exit, getHTML(), initViewSettings(), and user().

Referenced by orderPDItemsByLocation(), orderPDItemsByStartDate(), and orderPDItemsByType().

567  {
568  $this->user->writePref('pd_order_items', $sort_type);
569  $this->initViewSettings();
570 
571  if ($this->ctrl->isAsynch()) {
572  echo $this->getHTML();
573  exit;
574  }
575 
576  $this->ctrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
577  $this->ctrl->redirectByClass('ilpersonaldesktopgui', 'show');
578  }
user()
Definition: user.php:4
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmedRemove()

ilPDSelectedItemsBlockGUI::confirmedRemove ( )

Definition at line 683 of file class.ilPDSelectedItemsBlockGUI.php.

References $_POST, $ctrl, $ilCtrl, $ilUser, $type, $user, ilObjUser\_dropDesktopItem(), ilObject\_lookupType(), and ilUtil\sendSuccess().

684  {
687 
688  if (!sizeof($_POST["ref_id"])) {
689  $ilCtrl->redirect($this, "manage");
690  }
691 
692  foreach ($_POST["ref_id"] as $ref_id) {
693  $type = ilObject::_lookupType($ref_id, true);
694  ilObjUser::_dropDesktopItem($ilUser->getId(), $ref_id, $type);
695  }
696 
697  // #12909
698  ilUtil::sendSuccess($this->lng->txt("pd_remove_multi_confirm"), true);
699  $ilCtrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
700  $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
701  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$type
global $ilCtrl
Definition: ilias.php:18
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop
$ilUser
Definition: imgupload.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
$_POST["username"]
+ Here is the call graph for this function:

◆ confirmedUnsubscribe()

ilPDSelectedItemsBlockGUI::confirmedUnsubscribe ( )

Definition at line 703 of file class.ilPDSelectedItemsBlockGUI.php.

References $_POST, ilBlockGUI\$access, $ctrl, $ilCtrl, $ilUser, $user, ilObject\_lookupObjId(), ilObject\_lookupType(), ilForumNotification\checkForumsExistsDelete(), ilUtil\sendSuccess(), ilGroupMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE, and ilGroupMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER.

704  {
706  $ilAccess = $this->access;
708 
709  if (!sizeof($_POST["ref_id"])) {
710  $ilCtrl->redirect($this, "manage");
711  }
712 
713  foreach ($_POST["ref_id"] as $ref_id) {
714  if ($ilAccess->checkAccess("leave", "", $ref_id)) {
715  switch (ilObject::_lookupType($ref_id, true)) {
716  case "crs":
717  // see ilObjCourseGUI:performUnsubscribeObject()
718  include_once "Modules/Course/classes/class.ilCourseParticipants.php";
719  $members = new ilCourseParticipants(ilObject::_lookupObjId($ref_id));
720  $members->delete($ilUser->getId());
721 
722  $members->sendUnsubscribeNotificationToAdmins($ilUser->getId());
723  $members->sendNotification(
724  $members->NOTIFY_UNSUBSCRIBE,
725  $ilUser->getId()
726  );
727  break;
728 
729  case "grp":
730  // see ilObjGroupGUI:performUnsubscribeObject()
731  include_once "Modules/Group/classes/class.ilGroupParticipants.php";
732  $members = new ilGroupParticipants(ilObject::_lookupObjId($ref_id));
733  $members->delete($ilUser->getId());
734 
735  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
736  $members->sendNotification(
738  $ilUser->getId()
739  );
740  $members->sendNotification(
742  $ilUser->getId()
743  );
744  break;
745 
746  default:
747  // do nothing
748  continue;
749  }
750 
751  include_once './Modules/Forum/classes/class.ilForumNotification.php';
753  }
754  }
755 
756 
757  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
758  $ilCtrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
759  $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
760  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
static checkForumsExistsDelete($ref_id, $user_id=0)
$_POST["username"]
+ Here is the call graph for this function:

◆ confirmRemoveObject()

ilPDSelectedItemsBlockGUI::confirmRemoveObject ( )

Definition at line 640 of file class.ilPDSelectedItemsBlockGUI.php.

References $_POST, $ctrl, $ilCtrl, $title, $type, ilObject\_getIcon(), ilObject\_lookupObjectId(), ilObject\_lookupTitle(), ilObject\_lookupType(), and ilUtil\sendFailure().

641  {
643 
644  $ilCtrl->setParameter($this, 'view', $this->viewSettings->getCurrentView());
645  if (!sizeof($_POST["id"])) {
646  ilUtil::sendFailure($this->lng->txt("select_one"), true);
647  $ilCtrl->redirect($this, "manage");
648  }
649 
650  if ($this->viewSettings->isSelectedItemsViewActive()) {
651  $question = $this->lng->txt("pd_info_delete_sure_remove");
652  $cmd = "confirmedRemove";
653  } else {
654  $question = $this->lng->txt("pd_info_delete_sure_unsubscribe");
655  $cmd = "confirmedUnsubscribe";
656  }
657 
658  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
659  $cgui = new ilConfirmationGUI();
660  $cgui->setHeaderText($question);
661 
662  $cgui->setFormAction($ilCtrl->getFormAction($this));
663  $cgui->setCancel($this->lng->txt("cancel"), "manage");
664  $cgui->setConfirm($this->lng->txt("confirm"), $cmd);
665 
666  foreach ($_POST["id"] as $ref_id) {
667  $obj_id = ilObject::_lookupObjectId($ref_id);
668  $title = ilObject::_lookupTitle($obj_id);
669  $type = ilObject::_lookupType($obj_id);
670 
671  $cgui->addItem(
672  "ref_id[]",
673  $ref_id,
674  $title,
675  ilObject::_getIcon($obj_id, "small", $type),
676  $this->lng->txt("icon") . " " . $this->lng->txt("obj_" . $type)
677  );
678  }
679 
680  return $cgui->getHTML();
681  }
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
$type
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
global $ilCtrl
Definition: ilias.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ executeCommand()

ilPDSelectedItemsBlockGUI::executeCommand ( )

Definition at line 240 of file class.ilPDSelectedItemsBlockGUI.php.

References ilCommonActionDispatcherGUI\getInstanceFromAjaxCall().

241  {
242  $next_class = $this->ctrl->getNextClass();
243  $cmd = $this->ctrl->getCmd('getHTML');
244 
245  switch ($next_class) {
246  case 'ilcommonactiondispatchergui':
247  include_once('Services/Object/classes/class.ilCommonActionDispatcherGUI.php');
249  $this->ctrl->forwardCommand($gui);
250  break;
251 
252  default:
253  if (method_exists($this, $cmd)) {
254  return $this->$cmd();
255  } else {
256  return $this->{$cmd . 'Object'}();
257  }
258  }
259  }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ fillDataSection()

ilPDSelectedItemsBlockGUI::fillDataSection ( )

Definition at line 280 of file class.ilPDSelectedItemsBlockGUI.php.

References getContent(), and ilBlockGUI\setDataSection().

281  {
282  if ($this->getContent() == '') {
283  $this->setDataSection($this->view->getIntroductionHtml());
284  } else {
285  $this->tpl->setVariable('BLOCK_ROW', $this->getContent());
286  }
287  }
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
+ Here is the call graph for this function:

◆ fillDetailRow()

ilPDSelectedItemsBlockGUI::fillDetailRow ( )

Definition at line 122 of file class.ilPDSelectedItemsBlockGUI.php.

123  {
124  // $this->ctrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
125  parent::fillDetailRow();
126  // $this->ctrl->setParameterByClass('ilpersonaldesktopgui', 'view', '');
127  }

◆ fillFooter()

ilPDSelectedItemsBlockGUI::fillFooter ( )

Definition at line 293 of file class.ilPDSelectedItemsBlockGUI.php.

References ilBlockGUI\fillFooterLinks(), ilBlockGUI\getColSpan(), and setFooterLinks().

294  {
295  $this->setFooterLinks();
296  $this->fillFooterLinks();
297  $this->tpl->setVariable('FCOLSPAN', $this->getColSpan());
298  if ($this->tpl->blockExists('block_footer')) {
299  $this->tpl->setCurrentBlock('block_footer');
300  $this->tpl->parseCurrentBlock();
301  }
302  }
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
getColSpan()
Get Columns Span.
+ Here is the call graph for this function:

◆ getBlockType()

static ilPDSelectedItemsBlockGUI::getBlockType ( )
static

Definition at line 156 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by setFooterLinks().

157  {
158  return self::$block_type;
159  }
+ Here is the caller graph for this function:

◆ getContent()

ilPDSelectedItemsBlockGUI::getContent ( )
protected
Returns
string

Definition at line 264 of file class.ilPDSelectedItemsBlockGUI.php.

References $content.

Referenced by fillDataSection(), getHTML(), and setFooterLinks().

+ Here is the caller graph for this function:

◆ getFooterLinks()

ilPDSelectedItemsBlockGUI::getFooterLinks ( )

Definition at line 228 of file class.ilPDSelectedItemsBlockGUI.php.

References array.

229  {
230  if ($this->viewSettings->isStudyProgrammeViewActive()) {
231  return array();
232  }
233 
234  return parent::getFooterLinks();
235  }
Create styles array
The data for the language used.

◆ getHTML()

ilPDSelectedItemsBlockGUI::getHTML ( )

Definition at line 193 of file class.ilPDSelectedItemsBlockGUI.php.

References $DIC, array, getContent(), getViewBlockHtml(), ilHelpGUI\ID_PART_SCREEN, setContent(), ilBlockGUI\setData(), ilBlockGUI\setEnableDetailRow(), and ilBlockGUI\setTitle().

Referenced by changeSortMode(), and manageObject().

194  {
195  global $DIC;
196 
197  $DIC->database()->useSlave(true);
198 
199  // workaround to show details row
200  $this->setData(array('dummy'));
201 
202  require_once 'Services/Object/classes/class.ilObjectListGUI.php';
203  ilObjectListGUI::prepareJSLinks(
204  '',
205  $this->ctrl->getLinkTargetByClass(array('ilcommonactiondispatchergui', 'ilnotegui'), '', '', true, false),
206  $this->ctrl->getLinkTargetByClass(array('ilcommonactiondispatchergui', 'iltagginggui'), '', '', true, false)
207  );
208 
209  $DIC['ilHelp']->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, $this->view->getScreenId());
210  $this->setTitle($this->view->getTitle());
211  $this->setContent($this->getViewBlockHtml());
212 
213  if ($this->getContent() == '') {
214  $this->setEnableDetailRow(false);
215  }
216 
217  // $this->ctrl->clearParametersByClass('ilpersonaldesktopgui');
218  $this->ctrl->clearParameters($this);
219 
220  $DIC->database()->useSlave(false);
221 
222  return parent::getHTML();
223  }
global $DIC
Definition: saml.php:7
setTitle($a_title)
Set Title.
setData($a_data)
Set Data.
Create styles array
The data for the language used.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
const ID_PART_SCREEN
getViewBlockHtml()
get selected item block
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getScreenMode()

static ilPDSelectedItemsBlockGUI::getScreenMode ( )
static

Definition at line 164 of file class.ilPDSelectedItemsBlockGUI.php.

References $_GET, $_POST, IL_SCREEN_FULL, and IL_SCREEN_SIDE.

165  {
166  $cmd = $_GET['cmd'];
167  if ($cmd == 'post') {
168  $cmd = $_POST['cmd'];
169  $cmd = array_shift(array_keys($cmd));
170  }
171 
172  switch ($cmd) {
173  case 'confirmRemove':
174  case 'manage':
175  return IL_SCREEN_FULL;
176 
177  default:
178  return IL_SCREEN_SIDE;
179  }
180  }
$_GET["client_id"]
const IL_SCREEN_FULL
const IL_SCREEN_SIDE
$_POST["username"]

◆ getViewBlockHtml()

ilPDSelectedItemsBlockGUI::getViewBlockHtml ( )
protected

get selected item block

Definition at line 442 of file class.ilPDSelectedItemsBlockGUI.php.

References ilTemplate\get(), ilBlockGUI\getCurrentDetailLevel(), newBlockTemplate(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by getHTML().

443  {
444  $tpl = $this->newBlockTemplate();
445 
446  $this->renderGroupedItems(
447  $tpl,
448  $this->view->getItemGroups(),
449  ($this->getCurrentDetailLevel() >= $this->view->getMinimumDetailLevelForSection())
450  );
451 
452  if ($this->manage && $this->view->supportsSelectAll()) {
453  // #11355 - see ContainerContentGUI::renderSelectAllBlock()
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();
460  }
461 
462  return $tpl->get();
463  }
newBlockTemplate()
returns a new list block template
getCurrentDetailLevel()
Get Current Detail Level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getViewSettings()

ilPDSelectedItemsBlockGUI::getViewSettings ( )

◆ initViewSettings()

ilPDSelectedItemsBlockGUI::initViewSettings ( )
protected

Definition at line 90 of file class.ilPDSelectedItemsBlockGUI.php.

References $_GET, ilPDSelectedItemsBlockViewGUI\bySettings(), and user().

Referenced by __construct(), and changeSortMode().

91  {
92  require_once 'Services/PersonalDesktop/ItemsBlock/classes/class.ilPDSelectedItemsBlockViewSettings.php';
93  $this->viewSettings = new ilPDSelectedItemsBlockViewSettings($this->user, (int) $_GET['view']);
94  $this->viewSettings->parse();
95 
96  require_once 'Services/PersonalDesktop/ItemsBlock/classes/class.ilPDSelectedItemsBlockViewGUI.php';
97  $this->view = ilPDSelectedItemsBlockViewGUI::bySettings($this->viewSettings);
98 
99  $_GET['view'] = $this->viewSettings->getCurrentView();
100  $this->ctrl->saveParameter($this, 'view');
101  }
$_GET["client_id"]
user()
Definition: user.php:4
static bySettings(ilPDSelectedItemsBlockViewSettings $viewSettings)
Class ilPDSelectedItemsBlockViewSettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isManagedView()

ilPDSelectedItemsBlockGUI::isManagedView ( )

Definition at line 114 of file class.ilPDSelectedItemsBlockGUI.php.

References $manage.

◆ isRepositoryObject()

static ilPDSelectedItemsBlockGUI::isRepositoryObject ( )
static

Definition at line 185 of file class.ilPDSelectedItemsBlockGUI.php.

186  {
187  return false;
188  }

◆ manageObject()

ilPDSelectedItemsBlockGUI::manageObject ( )

Definition at line 604 of file class.ilPDSelectedItemsBlockGUI.php.

References $ctrl, $ilCtrl, $lng, getHTML(), ilUtil\getImagePath(), ilSubmitButton\getInstance(), and ilBlockGUI\setAvailableDetailLevels().

605  {
607  $lng = $this->lng;
608 
609  $this->manage = true;
610  $this->setAvailableDetailLevels(1, 1);
611 
612  $top_tb = new ilToolbarGUI();
613  $top_tb->setFormAction($ilCtrl->getFormAction($this));
614  $top_tb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
615 
616  $button = ilSubmitButton::getInstance();
617  if ($this->viewSettings->isSelectedItemsViewActive()) {
618  $button->setCaption("remove");
619  } else {
620  $button->setCaption("pd_unsubscribe_memberships");
621  }
622  $button->setCommand("confirmRemove");
623  $top_tb->addStickyItem($button);
624 
625  $button2 = ilSubmitButton::getInstance();
626  $button2->setCaption("cancel");
627  $button2->setCommand("getHTML");
628  $top_tb->addStickyItem($button2);
629 
630  $top_tb->setCloseFormTag(false);
631 
632  $bot_tb = new ilToolbarGUI();
633  $bot_tb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
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();
638  }
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
+ Here is the call graph for this function:

◆ newBlockTemplate()

ilPDSelectedItemsBlockGUI::newBlockTemplate ( )

returns a new list block template

private

Returns
object block template

Definition at line 476 of file class.ilPDSelectedItemsBlockGUI.php.

References ilBlockGUI\$tpl.

Referenced by getViewBlockHtml().

477  {
478  $tpl = new ilTemplate("tpl.pd_list_block.html", true, true, "Services/PersonalDesktop");
479  $this->cur_row_type = "";
480  return $tpl;
481  }
special template class to simplify handling of ITX/PEAR
+ Here is the caller graph for this function:

◆ orderPDItemsByLocation()

ilPDSelectedItemsBlockGUI::orderPDItemsByLocation ( )

Sort desktop items by location.

Definition at line 583 of file class.ilPDSelectedItemsBlockGUI.php.

References changeSortMode().

584  {
585  $this->changeSortMode($this->viewSettings->getSortByLocationMode());
586  }
+ Here is the call graph for this function:

◆ orderPDItemsByStartDate()

ilPDSelectedItemsBlockGUI::orderPDItemsByStartDate ( )

Sort desktop items by start date.

Definition at line 599 of file class.ilPDSelectedItemsBlockGUI.php.

References changeSortMode().

600  {
601  $this->changeSortMode($this->viewSettings->getSortByStartDateMode());
602  }
+ Here is the call graph for this function:

◆ orderPDItemsByType()

ilPDSelectedItemsBlockGUI::orderPDItemsByType ( )

Sort desktop items by Type.

Definition at line 591 of file class.ilPDSelectedItemsBlockGUI.php.

References changeSortMode().

592  {
593  $this->changeSortMode($this->viewSettings->getSortByTypeMode());
594  }
+ Here is the call graph for this function:

◆ removeFromDeskObject()

ilPDSelectedItemsBlockGUI::removeFromDeskObject ( )

Remove from desktop public.

Implements ilDesktopItemHandling.

Definition at line 144 of file class.ilPDSelectedItemsBlockGUI.php.

References ilDesktopItemGUI\removeFromDesktop(), and ilUtil\sendSuccess().

145  {
146  include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
148  ilUtil::sendSuccess($this->lng->txt("removed_from_desktop"), true);
149  $this->ctrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
150  $this->ctrl->redirectByClass('ilpersonaldesktopgui', 'show');
151  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static removeFromDesktop()
Remove item from personal desktop public.
+ Here is the call graph for this function:

◆ resetRowType()

ilPDSelectedItemsBlockGUI::resetRowType ( )
protected

Definition at line 465 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by addSectionHeader(), and setFooterLinks().

466  {
467  $this->cur_row_type = "";
468  }
+ Here is the caller graph for this function:

◆ setContent()

ilPDSelectedItemsBlockGUI::setContent (   $a_content)
protected
Parameters
string$a_content

Definition at line 272 of file class.ilPDSelectedItemsBlockGUI.php.

References $a_content.

Referenced by getHTML().

273  {
274  $this->content = $a_content;
275  }
$a_content
Definition: workflow.php:93
+ Here is the caller graph for this function:

◆ setFooterLinks()

ilPDSelectedItemsBlockGUI::setFooterLinks ( )
protected

Definition at line 307 of file class.ilPDSelectedItemsBlockGUI.php.

References ilBlockGUI\$block_id, $html, $output, $rbacsystem, ilBlockGUI\$tpl, ilBlockGUI\addFooterLink(), ilObjectActivation\addListGUIActivationProperty(), addSectionHeader(), addStandardRow(), array, getBlockType(), getContent(), resetRowType(), and ilBlockGUI\setEnableNumInfo().

Referenced by fillFooter().

308  {
309  if ($this->getContent() == '') {
310  $this->setEnableNumInfo(false);
311  return '';
312  }
313 
314  if ($this->manage) {
315  return '';
316  }
317 
318  $this->addFooterLink(
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,
323  false,
324  false,
325  $this->viewSettings->isSortedByType()
326  );
327 
328  $this->addFooterLink(
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,
333  false,
334  false,
335  $this->viewSettings->isSortedByLocation()
336  );
337 
338  if ($this->viewSettings->isMembershipsViewActive()) {
339  $this->addFooterLink(
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,
344  false,
345  false,
346  $this->viewSettings->isSortedByStartDate()
347  );
348  }
349 
350  $this->addFooterLink(
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"),
355  null,
356  "block_" . $this->getBlockType() . "_" . $this->block_id
357  );
358  }
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $block_type

ilPDSelectedItemsBlockGUI::$block_type = 'pditems'
static

Definition at line 36 of file class.ilPDSelectedItemsBlockGUI.php.

◆ $content

ilPDSelectedItemsBlockGUI::$content = ''
protected

Definition at line 48 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by getContent().

◆ $ctrl

ilPDSelectedItemsBlockGUI::$ctrl
protected

◆ $lng

ilPDSelectedItemsBlockGUI::$lng
protected

Definition at line 51 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by manageObject().

◆ $manage

ilPDSelectedItemsBlockGUI::$manage = false
protected

Definition at line 45 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by isManagedView().

◆ $obj_definition

ilPDSelectedItemsBlockGUI::$obj_definition
protected

Definition at line 33 of file class.ilPDSelectedItemsBlockGUI.php.

◆ $rbacsystem

ilPDSelectedItemsBlockGUI::$rbacsystem
protected

Definition at line 23 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by setFooterLinks().

◆ $settings

ilPDSelectedItemsBlockGUI::$settings
protected

Definition at line 28 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by addStandardRow().

◆ $user

ilPDSelectedItemsBlockGUI::$user
protected

Definition at line 57 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by confirmedRemove(), and confirmedUnsubscribe().

◆ $view

ilPDSelectedItemsBlockGUI::$view
protected

Definition at line 42 of file class.ilPDSelectedItemsBlockGUI.php.

◆ $viewSettings

ilPDSelectedItemsBlockGUI::$viewSettings
protected

Definition at line 39 of file class.ilPDSelectedItemsBlockGUI.php.

Referenced by getViewSettings().


The documentation for this class was generated from the following file: