Ejemplo n.º 1
0
 public function removeTutorial(TutorialInterface $tutorial)
 {
     $tutorial->setTrashed(true);
     $this->em->persist($tutorial);
     $this->em->flush();
     if (null !== $tutorial->getAuthor()) {
         $this->redis->hincrby(sprintf('user:%d', $tutorial->getAuthor()->getId()), 'tutorial_count', -1);
     }
 }