1 <?php declare(strict_types=1);
31 $publicChatObjId = (int)
$dic[
'ilObjDataCache']->lookupObjId($publicChatRefId);
33 $icon = $this->dic->ui()->factory()
36 ->standard(
Standard::CHTA, $this->dic->language()->txt(
'public_room'))->withIsOutlined(
true);
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)
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;
51 ->withVisibilityCallable(
52 function () use (
$dic, $publicChatRefId) :
bool {
53 if (0 === (
int)
$dic->user()->getId() ||
$dic->user()->isAnonymous()) {
57 $hasPublicChatRoomAccess =
$dic 60 ->checkAccessOfUser(
$dic->user()->getId(),
'read', $publicChatRefId);
63 (
new \
ilSetting(
'chatroom'))->get(
'chat_enabled') &&
64 $hasPublicChatRoomAccess
Interface StaticMainMenuProvider.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias