public function updateEntityRateCount(Comment $comment) { $activities = $this->entityManager->getRepository(Activity::getActivityClassByEntity($comment->getQuestion()))->findBy(['questionId' => $comment->getQuestion()->getId()]); /* @var Activity $activity */ foreach ($activities as $activity) { $activity->setRateUp($comment->getRateUp())->setRateDown($comment->getRateDown()); $this->entityManager->flush($activity); } }
public function getRateDown() { $this->__load(); return parent::getRateDown(); }