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'))
71 ->withNonAvailableReason(
72 $this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt(
'component_not_active'))
75 static fn():
bool => $publicChatObjId > 0
78 static function () use (
$dic, $publicChatRefId):
bool {
83 $hasPublicChatRoomAccess =
$dic
86 ->checkAccessOfUser(
$dic->
user()->getId(),
'read', $publicChatRefId);
89 (
new ilSetting(
'chatroom'))->
get(
'chat_enabled',
'0') &&
90 $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.
@ilCtrl_Calls ilObjChatroomGUI: ilMDEditorGUI, ilInfoScreenGUI, ilPermissionGUI, ilObjectCopyGUI @ilC...
This describes the specific behavior of an ILIAS standard icon.
withAvailableCallable(callable $is_available)
withVisibilityCallable(callable $is_visible)
if(!file_exists('../ilias.ini.php'))