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