/**
  * @param TopicEvent $event
  */
 public function onTopicPersist(TopicEvent $event)
 {
     $topic = $event->getTopic();
     if (!$this->topicManager->isNewTopic($topic)) {
         return;
     }
     $topic->getCategory()->incrementTopicsCount();
 }
Beispiel #2
0
 public function __construct(PostInterface $post)
 {
     parent::__construct($post->getTopic());
     $this->post = $post;
 }