ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\MainMenu\Provider\ChatMainBarProvider Class Reference
+ Inheritance diagram for ILIAS\MainMenu\Provider\ChatMainBarProvider:
+ Collaboration diagram for ILIAS\MainMenu\Provider\ChatMainBarProvider:

Public Member Functions

 getStaticTopItems ()
 @inheritDoc More...
 
 getStaticSubItems ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getAllIdentifications ()
 @inheritDoc More...
 
 provideTypeInformation ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getStaticTopItems ()
 
 getStaticSubItems ()
 
 provideTypeInformation ()
 
 getAllIdentifications ()
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 $dic
 
 $if
 
 $mainmenu
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Definition at line 13 of file ChatMainBarProvider.php.

Member Function Documentation

◆ getStaticSubItems()

ILIAS\MainMenu\Provider\ChatMainBarProvider::getStaticSubItems ( )

@inheritDoc

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 26 of file ChatMainBarProvider.php.

26 : array
27 {
29
30 $publicChatRefId = (int) \ilObjChatroom::_getPublicRefId();
31 $publicChatObjId = (int) $dic['ilObjDataCache']->lookupObjId($publicChatRefId);
32
33 $icon = $this->dic->ui()->factory()
34 ->symbol()
35 ->icon()
36 ->standard(Standard::CHTA, $this->dic->language()->txt('public_room'))->withIsOutlined(true);
37
38 return [
39 $this->mainmenu->link($this->if->identifier('mm_public_chat'))
40 ->withTitle($this->dic->language()->txt('public_room'))
41 ->withAction('ilias.php?baseClass=ilRepositoryGUI&cmd=view&ref_id=' . $publicChatRefId)
42 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
43 ->withPosition(10)
44 ->withSymbol($icon)
45 ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
46 ->withAvailableCallable(
47 function () use ($publicChatObjId) : bool {
48 return $publicChatObjId > 0;
49 }
50 )
51 ->withVisibilityCallable(
52 function () use ($dic, $publicChatRefId) : bool {
53 if (0 === (int) $dic->user()->getId() || $dic->user()->isAnonymous()) {
54 return false;
55 }
56
57 $hasPublicChatRoomAccess = $dic
58 ->rbac()
59 ->system()
60 ->checkAccessOfUser($dic->user()->getId(), 'read', $publicChatRefId);
61
62 return (
63 (new \ilSetting('chatroom'))->get('chat_enabled') &&
64 $hasPublicChatRoomAccess
65 );
66 }
67 ),
68 ];
69 }
user()
Definition: user.php:4
ILIAS Setting Class.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12

References ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider\$dic, ilObjChatroom\_getPublicRefId(), ILIAS\UI\Component\Symbol\Icon\Standard\CHTA, ILIAS\MainMenu\Provider\StandardTopItemsProvider\getInstance(), and if.

+ Here is the call graph for this function:

◆ getStaticTopItems()

ILIAS\MainMenu\Provider\ChatMainBarProvider::getStaticTopItems ( )

@inheritDoc

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 18 of file ChatMainBarProvider.php.

18 : array
19 {
20 return [];
21 }

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