ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 getBlockType ()
 
 getHTML ()
 
 getFooterLinks ()
 
 executeCommand ()
 
 fillDataSection ()
 
 fillFooter ()
 
 newBlockTemplate ()
 returns a new list 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
 getBlockType ()
 
 __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 getScreenMode ()
 
- Static Public Member Functions inherited from ilBlockGUI
static getScreenMode ()
 Get Screen Mode for current command. More...
 

Static Public Attributes

static $block_type = 'pditems'
 

Protected Member Functions

 initViewSettings ()
 
 isRepositoryObject ()
 
 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
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 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  }
settings()
Definition: settings.php:2
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.
+ 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 $DIC, $ilSetting, $settings, $title, ilPDSelectedItemsBlockGroup\getIconPath(), ilUtil\getImagePath(), 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:

◆ addToDeskObject()

ilPDSelectedItemsBlockGUI::addToDeskObject ( )

Add desktop item public.

Implements ilDesktopItemHandling.

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

References ilDesktopItemGUI\addToDesktop().

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 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 568 of file class.ilPDSelectedItemsBlockGUI.php.

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

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

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

◆ confirmedRemove()

ilPDSelectedItemsBlockGUI::confirmedRemove ( )

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

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

686  {
689 
690  if (!sizeof($_POST["ref_id"])) {
691  $ilCtrl->redirect($this, "manage");
692  }
693 
694  foreach ($_POST["ref_id"] as $ref_id) {
695  $type = ilObject::_lookupType($ref_id, true);
696  ilObjUser::_dropDesktopItem($ilUser->getId(), $ref_id, $type);
697  }
698 
699  // #12909
700  ilUtil::sendSuccess($this->lng->txt("pd_remove_multi_confirm"), true);
701  $ilCtrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
702  $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
703  }
$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 705 of file class.ilPDSelectedItemsBlockGUI.php.

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

706  {
708  $ilAccess = $this->access;
710 
711  if (!sizeof($_POST["ref_id"])) {
712  $ilCtrl->redirect($this, "manage");
713  }
714 
715  foreach ($_POST["ref_id"] as $ref_id) {
716  if ($ilAccess->checkAccess("leave", "", $ref_id)) {
717  switch (ilObject::_lookupType($ref_id, true)) {
718  case "crs":
719  // see ilObjCourseGUI:performUnsubscribeObject()
720  include_once "Modules/Course/classes/class.ilCourseParticipants.php";
721  $members = new ilCourseParticipants(ilObject::_lookupObjId($ref_id));
722  $members->delete($ilUser->getId());
723 
724  $members->sendUnsubscribeNotificationToAdmins($ilUser->getId());
725  $members->sendNotification(
726  $members->NOTIFY_UNSUBSCRIBE,
727  $ilUser->getId()
728  );
729  break;
730 
731  case "grp":
732  // see ilObjGroupGUI:performUnsubscribeObject()
733  include_once "Modules/Group/classes/class.ilGroupParticipants.php";
734  $members = new ilGroupParticipants(ilObject::_lookupObjId($ref_id));
735  $members->delete($ilUser->getId());
736 
737  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
738  $members->sendNotification(
740  $ilUser->getId()
741  );
742  $members->sendNotification(
744  $ilUser->getId()
745  );
746  break;
747 
748  default:
749  // do nothing
750  continue 2;
751  }
752 
753  include_once './Modules/Forum/classes/class.ilForumNotification.php';
755  }
756  }
757 
758 
759  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
760  $ilCtrl->setParameterByClass('ilpersonaldesktopgui', 'view', $this->viewSettings->getCurrentView());
761  $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
762  }
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 642 of file class.ilPDSelectedItemsBlockGUI.php.

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

643  {
645 
646  $ilCtrl->setParameter($this, 'view', $this->viewSettings->getCurrentView());
647  if (!sizeof($_POST["id"])) {
648  ilUtil::sendFailure($this->lng->txt("select_one"), true);
649  $ilCtrl->redirect($this, "manage");
650  }
651 
652  if ($this->viewSettings->isSelectedItemsViewActive()) {
653  $question = $this->lng->txt("pd_info_delete_sure_remove");
654  $cmd = "confirmedRemove";
655  } else {
656  $question = $this->lng->txt("pd_info_delete_sure_unsubscribe");
657  $cmd = "confirmedUnsubscribe";
658  }
659 
660  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
661  $cgui = new ilConfirmationGUI();
662  $cgui->setHeaderText($question);
663 
664  $cgui->setFormAction($ilCtrl->getFormAction($this));
665  $cgui->setCancel($this->lng->txt("cancel"), "manage");
666  $cgui->setConfirm($this->lng->txt("confirm"), $cmd);
667 
668  foreach ($_POST["id"] as $ref_id) {
669  $obj_id = ilObject::_lookupObjectId($ref_id);
670  $title = ilObject::_lookupTitle($obj_id);
671  $type = ilObject::_lookupType($obj_id);
672 
673  $cgui->addItem(
674  "ref_id[]",
675  $ref_id,
676  $title,
677  ilObject::_getIcon($obj_id, "small", $type),
678  $this->lng->txt("icon") . " " . $this->lng->txt("obj_" . $type)
679  );
680  }
681 
682  return $cgui->getHTML();
683  }
$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()

ilPDSelectedItemsBlockGUI::getBlockType ( )

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

Referenced by setFooterLinks().

156  : string
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.

229  {
230  if ($this->viewSettings->isStudyProgrammeViewActive()) {
231  return array();
232  }
233 
234  return parent::getFooterLinks();
235  }

◆ getHTML()

ilPDSelectedItemsBlockGUI::getHTML ( )

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

References $DIC, 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.
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()

ilPDSelectedItemsBlockGUI::isRepositoryObject ( )
protected

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

185  : bool
186  {
187  return false;
188  }

◆ manageObject()

ilPDSelectedItemsBlockGUI::manageObject ( )

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

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

607  {
609  $lng = $this->lng;
610 
611  $this->manage = true;
612  $this->setAvailableDetailLevels(1, 1);
613 
614  $top_tb = new ilToolbarGUI();
615  $top_tb->setFormAction($ilCtrl->getFormAction($this));
616  $top_tb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
617 
618  $button = ilSubmitButton::getInstance();
619  if ($this->viewSettings->isSelectedItemsViewActive()) {
620  $button->setCaption("remove");
621  } else {
622  $button->setCaption("pd_unsubscribe_memberships");
623  }
624  $button->setCommand("confirmRemove");
625  $top_tb->addStickyItem($button);
626 
627  $button2 = ilSubmitButton::getInstance();
628  $button2->setCaption("cancel");
629  $button2->setCommand("getHTML");
630  $top_tb->addStickyItem($button2);
631 
632  $top_tb->setCloseFormTag(false);
633 
634  $bot_tb = new ilToolbarGUI();
635  $bot_tb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
636  $bot_tb->addStickyItem($button);
637  $bot_tb->addStickyItem($button2);
638  $bot_tb->setOpenFormTag(false);
639  return $top_tb->getHTML() . $this->getHTML() . $bot_tb->getHTML();
640  }
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 585 of file class.ilPDSelectedItemsBlockGUI.php.

References changeSortMode().

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

◆ orderPDItemsByStartDate()

ilPDSelectedItemsBlockGUI::orderPDItemsByStartDate ( )

Sort desktop items by start date.

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

References changeSortMode().

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

◆ orderPDItemsByType()

ilPDSelectedItemsBlockGUI::orderPDItemsByType ( )

Sort desktop items by Type.

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

References changeSortMode().

594  {
595  $this->changeSortMode($this->viewSettings->getSortByTypeMode());
596  }
+ 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().

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 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, Sabre\VObject\$output, $rbacsystem, ilBlockGUI\$tpl, ilBlockGUI\addFooterLink(), ilObjectActivation\addListGUIActivationProperty(), addSectionHeader(), 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 addSectionHeader().

◆ $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: