getRoom($objectID)->getUsers()); } /** * @inheritDoc */ public function getLink($objectID): string { $room = RoomCache::getInstance()->getRoom($objectID); if ($room === null) { throw new \InvalidArgumentException('Invalid room ID given'); } return $room->getLink(); } /** * @inheritDoc */ public function isVisible($objectID = null): bool { 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(); } /** * @inheritDoc */ public function getOnlineLocation(Page $page, UserOnline $user): string { if ($user->pageObjectID === null) { return ''; } $room = RoomCache::getInstance()->getRoom($user->pageObjectID); if ($room === null) { return ''; } if (!$room->canSee()) { return ''; } return WCF::getLanguage()->getDynamicVariable( 'wcf.page.onlineLocation.' . $page->identifier, [ 'room' => $room, ] ); } }