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