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