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