public function initChatRoom(ChatRoom $chatRoom) { $roomName = $chatRoom->getRoomName(); if (empty($roomName)) { $guid = $chatRoom->getResourceNode()->getGuid(); $chatRoom->setRoomName(strtolower($guid)); $this->om->persist($chatRoom); $this->om->flush(); } }
private function hasChatRoomRight(ChatRoom $chatRoom, $right) { $collection = new ResourceCollection([$chatRoom->getResourceNode()]); return $this->authorization->isGranted($right, $collection); }