19declare(strict_types=1);
48 $publicChatObjId = (
int)
$dic[
'ilObjDataCache']->lookupObjId($publicChatRefId);
50 $icon = $this->dic->
ui()->factory()
53 ->standard(
Standard::CHTA, $this->dic->language()->txt(
'public_room'));
55 $this->dic->ctrl()->setParameterByClass(ilObjChatroomGUI::class,
'ref_id', $publicChatRefId);
56 $chatUrl = $this->dic->ctrl()->getLinkTargetByClass(
58 ilRepositoryGUI::class,
59 ilObjChatroomGUI::class
65 $this->mainmenu->link($this->
if->identifier(
'mm_public_chat'))
66 ->withTitle($this->dic->language()->txt(
'public_room'))
67 ->withAction($chatUrl)
71 ->withNonAvailableReason(
72 $this->dic->ui()->factory()->legacy($this->dic->language()->txt(
'component_not_active'))
74 ->withAvailableCallable(
75 static function () use ($publicChatObjId):
bool {
76 return $publicChatObjId > 0;
79 ->withVisibilityCallable(
80 static function () use (
$dic, $publicChatRefId):
bool {
85 $hasPublicChatRoomAccess =
$dic
88 ->checkAccessOfUser(
$dic->
user()->getId(),
'read', $publicChatRefId);
91 (
new ilSetting(
'chatroom'))->
get(
'chat_enabled',
'0') &&
92 $hasPublicChatRoomAccess
user()
Get the current user.
ui()
Get the interface to get services from UI framework.
rbac()
Get interface to get interfaces to all things rbac.
Interface StaticMainMenuProvider.
Class StandardTopItemsProvider.
Class ilObjChatroomGUI GUI class for chatroom objects.
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...
This describes the specific behavior of an ILIAS standard icon.