19 declare(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'))
74 ->withAvailableCallable(
75 static fn():
bool => $publicChatObjId > 0
77 ->withVisibilityCallable(
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.
if(!file_exists('../ilias.ini.php'))
rbac()
Get interface to get interfaces to all things rbac.
ui()
Get the interface to get services from UI framework.