Newscoop\GimmeBundle\Serializer\Article\CommentsCountHandler::getRecomendedCommentsCount PHP Метод

getRecomendedCommentsCount() публичный Метод

public getRecomendedCommentsCount ( JMS\Serializer\JsonSerializationVisitor $visitor, $data, $type )
$visitor JMS\Serializer\JsonSerializationVisitor
    public function getRecomendedCommentsCount(JsonSerializationVisitor $visitor, $data, $type)
    {
        $commentsCount = $this->commentService->getCommentCounts(array($data->number), true);
        if (count($commentsCount)) {
            return $commentsCount[0][1];
        }
        return 0;
    }