ILIAS  release_8 Revision v8.24
ILIAS\Chatroom\Provider\ChatMainBarProvider Class Reference
+ Inheritance diagram for ILIAS\Chatroom\Provider\ChatMainBarProvider:
+ Collaboration diagram for ILIAS\Chatroom\Provider\ChatMainBarProvider:

Public Member Functions

 getStaticTopItems ()
 
 getStaticSubItems ()
 
- 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
Container $dic
 
IdentificationProviderInterface $if
 
MainMenuItemFactory $mainmenu
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Definition at line 36 of file ChatMainBarProvider.php.

Member Function Documentation

◆ getStaticSubItems()

ILIAS\Chatroom\Provider\ChatMainBarProvider::getStaticSubItems ( )
Returns
isItem[] These are Entries which will be available for configuration.

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

Definition at line 43 of file ChatMainBarProvider.php.

43 : array
44 {
46
47 $publicChatRefId = ilObjChatroom::_getPublicRefId();
48 $publicChatObjId = (int) $dic['ilObjDataCache']->lookupObjId($publicChatRefId);
49
50 $icon = $this->dic->ui()->factory()
51 ->symbol()
52 ->icon()
53 ->standard(Standard::CHTA, $this->dic->language()->txt('public_room'));
54
55 $this->dic->ctrl()->setParameterByClass(ilObjChatroomGUI::class, 'ref_id', $publicChatRefId);
56 $chatUrl = $this->dic->ctrl()->getLinkTargetByClass(
57 [
58 ilRepositoryGUI::class,
59 ilObjChatroomGUI::class
60 ],
61 'view'
62 );
63
64 return [
65 $this->mainmenu->link($this->if->identifier('mm_public_chat'))
66 ->withTitle($this->dic->language()->txt('public_room'))
67 ->withAction($chatUrl)
68 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
69 ->withPosition(30)
70 ->withSymbol($icon)
71 ->withNonAvailableReason(
72 $this->dic->ui()->factory()->legacy($this->dic->language()->txt('component_not_active'))
73 )
74 ->withAvailableCallable(
75 static function () use ($publicChatObjId): bool {
76 return $publicChatObjId > 0;
77 }
78 )
79 ->withVisibilityCallable(
80 static function () use ($dic, $publicChatRefId): bool {
81 if (0 === $dic->user()->getId() || $dic->user()->isAnonymous()) {
82 return false;
83 }
84
85 $hasPublicChatRoomAccess = $dic
86 ->rbac()
87 ->system()
88 ->checkAccessOfUser($dic->user()->getId(), 'read', $publicChatRefId);
89
90 return (
91 (new ilSetting('chatroom'))->get('chat_enabled', '0') &&
92 $hasPublicChatRoomAccess
93 );
94 }
95 ),
96 ];
97 }
user()
Get the current user.
Definition: Container.php:62
ui()
Get the interface to get services from UI framework.
Definition: Container.php:118
rbac()
Get interface to get interfaces to all things rbac.
Definition: Container.php:46
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']

References ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider\$dic, ilObjChatroom\_getPublicRefId(), ILIAS\UI\Component\Symbol\Icon\Standard\CHTA, ILIAS\MainMenu\Provider\StandardTopItemsProvider\getInstance(), if, ILIAS\Repository\int(), ILIAS\DI\Container\rbac(), ILIAS\DI\Container\ui(), and ILIAS\DI\Container\user().

+ Here is the call graph for this function:

◆ getStaticTopItems()

ILIAS\Chatroom\Provider\ChatMainBarProvider::getStaticTopItems ( )
Returns
TopParentItem[] These are Slates which will be available for configuration.

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

Definition at line 38 of file ChatMainBarProvider.php.

38 : array
39 {
40 return [];
41 }

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