public function showRecommendations(
        Twig_Environment $twigEnvironment,
        $contentId,
        $scenario,
        $limit,
        $contentType,
        $template,
        array $fields,
        array $params = array()
    ) {
        if (empty($fields)) {
            throw new InvalidArgumentException('Missing recommendation fields, at least one field is required');
        }

        $filters = '';
        if (isset($params['filters'])) {
            foreach ($params['filters'] as $key => $filter) {
                $filter = is_array($filter) ? implode(',', $filter) : $filter;
                $filters .= sprintf('&%s=%s', $key, $filter);
            }
        }

        return $twigEnvironment->render(
            sprintf('EzSystemsRecommendationBundle::%s.html.twig', $template),
            array(
                'contentId' => $contentId,
                'language' => $this->getCurrentLanguage(),
                'scenario' => $scenario,
                'limit' => $limit,
                'templateId' => uniqid(),
                'fields' => $fields,
                'filters' => $filters,
                'endpointUrl' => $this->getEndPointUrl(),
                'feedbackUrl' => $this->getFeedbackUrl($this->getContentTypeId($contentType)),
                'contentType' => $this->getContentTypeId($this->getContentIdentifier($contentId)),
                'outputTypeId' => $this->getContentTypeId($contentType),
                'categoryPath' => $this->getLocationPathString($contentId),
            )
        );
    }