getRoom($objectID); if ($room === null) throw new \InvalidArgumentException('Invalid room ID given'); $link = LinkHandler::getInstance()->getLink('Log', [ 'application' => 'chat' , 'object' => $room ]); return $link; } /** * @inheritDoc */ public function isVisible($objectID = null) { if (!WCF::getUser()->userID) return false; if ($objectID === null) throw new \InvalidArgumentException('Invalid room ID given'); $room = RoomCache::getInstance()->getRoom($objectID); if ($room === null) throw new \InvalidArgumentException('Invalid room ID given'); return $room->canSee() && $room->canSeeLog(); } /** * @inheritDoc */ public function getOnlineLocation(\wcf\data\page\Page $page, \wcf\data\user\online\UserOnline $user) { if ($user->pageObjectID === null) return ''; $room = RoomCache::getInstance()->getRoom($user->pageObjectID); if ($room === null) return ''; if (!$room->canSeeLog()) return ''; return WCF::getLanguage()->getDynamicVariable('wcf.page.onlineLocation.'.$page->identifier, [ 'room' => $room ]); } }