public followTopic ( |
||
$user | ||
$topic | ||
리턴 | void |
public function followTopic(User $user, Topic $topic)
{
try {
$this->em->persist(new UserTopic($user, $topic));
$this->em->flush();
$this->notify($user, $topic);
} catch (Exception $e) {
// ignore if exists
}
}