ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 manually ()
 
 getViewControlsForPanel ()
 
 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 ()
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 

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 ()
 Get items. More...
 
 getListItemForDataDTO (BlockDTO $data)
 
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 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 Container Block StandardGUIRequest $request
 
ILIAS Container 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)
Parameters
int[]$ids

Reimplemented from ilDashboardBlockGUI.

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

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':
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':
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 checkForumsExistsDelete(int $ref_id, int $user_id)
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
$ref_id
Definition: ltiauth.php:66

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

+ Here is the call graph for this function:

◆ emptyHandling()

ilMembershipBlockGUI::emptyHandling ( )

Reimplemented from ilDashboardBlockGUI.

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

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 }
renderer()
factory()

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

+ Here is the call graph for this function:

◆ getBlockType()

ilMembershipBlockGUI::getBlockType ( )

Reimplemented from ilBlockGUI.

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

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

◆ getRemoveMultipleActionText()

ilMembershipBlockGUI::getRemoveMultipleActionText ( )

Reimplemented from ilDashboardBlockGUI.

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

118 : string
119 {
120 return $this->lng->txt('pd_unsubscribe_multiple_memberships');
121 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initData()

ilMembershipBlockGUI::initData ( )

Reimplemented from ilDashboardBlockGUI.

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

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 }
@classDescription Date and time handling
$provider
Definition: ltitoken.php:80

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

+ Here is the call graph for this function:

◆ initViewSettings()

ilMembershipBlockGUI::initViewSettings ( )

Reimplemented from ilDashboardBlockGUI.

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

25 : void
26 {
27 $this->viewSettings = new ilPDSelectedItemsBlockViewSettings(
28 $this->user,
30 );
31
32 $this->ctrl->setParameter($this, 'view', $this->viewSettings->getCurrentView());
33 }

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

+ Here is the call graph for this function:

◆ removeMultipleEnabled()

ilMembershipBlockGUI::removeMultipleEnabled ( )

Reimplemented from ilDashboardBlockGUI.

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: