ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMembershipBlockGUI Class Reference
+ Inheritance diagram for ilMembershipBlockGUI:
+ Collaboration diagram for ilMembershipBlockGUI:

Public Member Functions

 initViewSettings ()
 
 emptyHandling ()
 
 initData ()
 
 getBlockType ()
 
 confirmedRemove (array $ids)
 
 removeMultipleEnabled ()
 
 getRemoveMultipleActionText ()
 
- Public Member Functions inherited from ilDashboardBlockGUI
 __construct ()
 
 initViewSettings ()
 
 initData ()
 
 emptyHandling ()
 
 addCustomCommandsToActionMenu (ilObjectListGUI $itemListGui, int $ref_id)
 
 getNoItemFoundContent ()
 
 getViewSettings ()
 
 init ()
 
 getHTML ()
 
 setData (array $a_data)
 
 getData ()
 
 addCommandActions ()
 
 getRemoveModal ()
 
 executeCommand ()
 
 viewDashboardObject ()
 
 changePDItemSortingObject ()
 
 changePDItemPresentationObject ()
 
 getItemGroups ()
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 removeMultipleEnabled ()
 
 getRemoveMultipleActionText ()
 
 confirmedRemove (array $ids)
 
 byType (string $a_type)
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 
 getBlockType ()
 
 setData (array $a_data)
 
 getData ()
 
 setPresentation (int $type)
 
 getPresentation ()
 
 setBlockId (string $a_block_id="0")
 
 getBlockId ()
 
 setGuiObject (object $a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setOffset (int $a_offset)
 
 getOffset ()
 
 checkOffset (int $offset)
 
 setLimit (int $a_limit)
 
 getLimit ()
 
 setEnableEdit (bool $a_enableedit)
 
 getEnableEdit ()
 
 setRepositoryMode (bool $a_repositorymode)
 
 getRepositoryMode ()
 
 setSubtitle (string $a_subtitle)
 
 getSubtitle ()
 
 setRefId (int $a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 
 setAdminCommands (bool $a_admincommands)
 
 getAdminCommands ()
 
 setEnableNumInfo (bool $a_enablenuminfo)
 
 getEnableNumInfo ()
 
 setProperties (array $a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty (string $a_property)
 
 setProperty (string $a_property, string $a_value)
 
 setRowTemplate (string $a_rowtemplatename, string $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 
 getRowTemplateDir ()
 
 addBlockCommand (string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
 
 getBlockCommands ()
 
 getHTML ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getViewControlsForPanel ()
 
 sortObject ()
 
 addSortOption (string $option, string $label, bool $active)
 
 setSortTarget (string $target)
 
 addPresentation (string $label, string $target, bool $active)
 
 getNoItemFoundContent ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilBlockGUI
static getScreenMode ()
 
- Data Fields inherited from ilBlockGUI
const PRES_MAIN_LEG = 0
 
const PRES_SEC_LEG = 1
 
const PRES_SEC_LIST = 2
 
const PRES_MAIN_LIST = 3
 
const PRES_MAIN_TILE = 4
 
- Protected Member Functions inherited from ilDashboardBlockGUI
 getCardForData (BlockDTO $data)
 
 getListItemGroups ()
 
 getListItemForDataDTO (BlockDTO $data)
 
 isRepositoryObject ()
 
 getLegacyContent ()
 
 initAndShow ()
 
 isRootNode (int $refId)
 
 getRepositoryTitle ()
 
 getManageFields ()
 
- Protected Member Functions inherited from ilBlockGUI
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 specialCharsAsEntities (string $string)
 
 initCommands ()
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
 handleNavigation ()
 Handle navigation. More...
 
 loadData ()
 Load data for current page. More...
 
 getListItemGroups ()
 Get items. More...
 
 addRepoCommands ()
 Add repo commands. More...
 
 getActionsForPanel ()
 
 send (string $output)
 Send. More...
 
- Protected Attributes inherited from ilDashboardBlockGUI
ilFavouritesManager $favourites_manager
 
int $requested_item_ref_id
 
ilSetting $settings
 
ilLogger $logging
 
Services $http
 
ilPDSelectedItemsBlockViewSettings $viewSettings
 
array $data
 
- Protected Attributes inherited from ilBlockGUI
ILIAS UI Renderer $renderer
 
Factory $factory
 
object $gui_object
 
ILIAS Block StandardGUIRequest $request
 
ILIAS Block BlockManager $block_manager
 
bool $repositorymode = false
 
ILIAS DI UIServices $ui
 
array $data = array()
 
bool $enablenuminfo = true
 
array $footer_links = array()
 
string $block_id = "0"
 
bool $allow_moving = true
 
array $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
array $block_commands = array()
 
int $max_count = 0
 
bool $close_command = false
 
bool $image = false
 
array $property = []
 
string $nav_value = ""
 
string $css_row = ""
 
string $title = ""
 
bool $admincommands = false
 
array $dropdown
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilAccessHandler $access
 
ilLanguage $lng
 
ilObjectDefinition $obj_def
 
int $presentation
 
int $requested_ref_id
 

Detailed Description

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

Member Function Documentation

◆ confirmedRemove()

ilMembershipBlockGUI::confirmedRemove ( array  $ids)

Definition at line 72 of file class.ilMembershipBlockGUI.php.

References $ref_id, ilObject\_lookupObjId(), ilObject\_lookupType(), ILIAS\Repository\access(), ilForumNotification\checkForumsExistsDelete(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilGroupMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE, ilGroupMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER, ilCourseMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER, and ILIAS\Repository\user().

72  : void
73  {
74  foreach ($ids as $ref_id) {
75  if ($this->access->checkAccess('leave', '', $ref_id)) {
76  switch (ilObject::_lookupType($ref_id, true)) {
77  case 'crs':
78  $members = new ilCourseParticipants(ilObject::_lookupObjId($ref_id));
79  $members->delete($this->user->getId());
80 
81  $members->sendUnsubscribeNotificationToAdmins($this->user->getId());
82  $members->sendNotification(
84  $this->user->getId()
85  );
86  break;
87 
88  case 'grp':
89  $members = new ilGroupParticipants(ilObject::_lookupObjId($ref_id));
90  $members->delete($this->user->getId());
91 
92  $members->sendNotification(
94  $this->user->getId()
95  );
96  $members->sendNotification(
98  $this->user->getId()
99  );
100  break;
101  default:
102  continue 2;
103  }
104 
105  ilForumNotification::checkForumsExistsDelete($ref_id, $this->user->getId());
106  }
107  }
108 
109  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('mmbr_unsubscribed_from_objs'), true);
110  $this->ctrl->returnToParent($this);
111  }
static _lookupObjId(int $ref_id)
$ref_id
Definition: ltiauth.php:65
static _lookupType(int $id, bool $reference=false)
static checkForumsExistsDelete(int $ref_id, int $user_id)
+ Here is the call graph for this function:

◆ emptyHandling()

ilMembershipBlockGUI::emptyHandling ( )

Definition at line 35 of file class.ilMembershipBlockGUI.php.

References factory(), ilBlockGUI\getTitle(), ILIAS\Repository\lng(), and renderer().

35  : string
36  {
37  $this->lng->loadLanguageModule('rep');
38  return $this->renderer->render(
39  $this->factory->panel()->standard(
40  $this->getTitle(),
41  $this->factory->legacy()->content($this->lng->txt('rep_mo_mem_dash'))
42  )
43  );
44  }
factory()
renderer()
+ Here is the call graph for this function:

◆ getBlockType()

ilMembershipBlockGUI::getBlockType ( )

Definition at line 67 of file class.ilMembershipBlockGUI.php.

67  : string
68  {
69  return 'pdmem';
70  }

◆ getRemoveMultipleActionText()

ilMembershipBlockGUI::getRemoveMultipleActionText ( )

Definition at line 118 of file class.ilMembershipBlockGUI.php.

References ILIAS\Repository\lng().

118  : string
119  {
120  return $this->lng->txt('pd_unsubscribe_multiple_memberships');
121  }
+ Here is the call graph for this function:

◆ initData()

ilMembershipBlockGUI::initData ( )

Definition at line 46 of file class.ilMembershipBlockGUI.php.

References ilDashboardBlockGUI\$data, $provider, null, ilDashboardBlockGUI\setData(), and ILIAS\Repository\user().

46  : void
47  {
49  $data = $provider->getItems();
50  $data = array_map(static function (array $item): BlockDTO {
51  $start = isset($item['start']) && $item['start'] instanceof ilDateTime ? $item['start'] : null;
52  $end = isset($item['end']) && $item['end'] instanceof ilDateTime ? $item['end'] : null;
53  return new BlockDTO(
54  $item['type'],
55  (int) $item['ref_id'],
56  (int) $item['obj_id'],
57  $item['title'],
58  $item['description'],
59  $start,
60  $end,
61  );
62  }, $data);
63 
64  $this->setData(['' => $data]);
65  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$provider
Definition: ltitoken.php:80
+ Here is the call graph for this function:

◆ initViewSettings()

ilMembershipBlockGUI::initViewSettings ( )

Definition at line 25 of file class.ilMembershipBlockGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\user(), and ilPDSelectedItemsBlockConstants\VIEW_MY_MEMBERSHIPS.

25  : void
26  {
27  $this->viewSettings = new ilPDSelectedItemsBlockViewSettings(
28  $this->user,
30  );
31 
32  $this->ctrl->setParameter($this, 'view', $this->viewSettings->getCurrentView());
33  }
+ Here is the call graph for this function:

◆ removeMultipleEnabled()

ilMembershipBlockGUI::removeMultipleEnabled ( )

Definition at line 113 of file class.ilMembershipBlockGUI.php.

113  : bool
114  {
115  return true;
116  }

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