Twig/RecommendationTwigExtension.php
public function trackUser(Twig_Environment $twigEnvironment, $contentId)
    {
        if (!in_array($this->getContentIdentifier($contentId), $this->options['includedContentTypes'])) {
            return '';
        }

        return $twigEnvironment->render(
            'EzSystemsRecommendationBundle::track_user.html.twig',
            array(
                'contentId' => $contentId,
                'contentTypeId' => $this->getContentTypeId($this->getContentIdentifier($contentId)),
                'language' => $this->getCurrentLanguage(),
                'userId' => $this->getCurrentUserId(),
                'customerId' => $this->options['customerId'],
                'consumeTimeout' => ($this->options['consumeTimeout'] * 1000),
                'trackingScriptUrl' => $this->options['trackingScriptUrl'],
            )
        );
    }
public function trackUser(Twig_Environment $twigEnvironment, $contentId)
    {
        if (!in_array($this->getContentIdentifier($contentId), $this->options['includedContentTypes'])) {
            return '';
        }

        return $twigEnvironment->render(
            'EzSystemsRecommendationBundle::track_user.html.twig',
            array(
                'contentId' => $contentId,
                'contentTypeId' => $this->getContentTypeId($this->getContentIdentifier($contentId)),
                'language' => $this->getCurrentLanguage(),
                'userId' => $this->getCurrentUserId(),
                'customerId' => $this->options['customerId'],
                'consumeTimeout' => ($this->options['consumeTimeout'] * 1000),
                'trackingScriptUrl' => $this->options['trackingScriptUrl'],
            )
        );
    }
public function trackUser ( Twig_Environment $ twigEnvironment , $ contentId ) { if ( ! in_array ( $ this -> getContentIdentifier ( $ contentId ) , $ this -> options [ 'includedContentTypes' ] ) ) { return '' ; } return $ twigEnvironment -> render ( 'EzSystemsRecommendationBundle::track_user.html.twig' , array ( 'contentId' => $ contentId , 'contentTypeId' => $ this -> getContentTypeId ( $ this -> getContentIdentifier ( $ contentId ) ) , 'language' => $ this -> getCurrentLanguage ( ) , 'userId' => $ this -> getCurrentUserId ( ) , 'customerId' => $ this -> options [ 'customerId' ] , 'consumeTimeout' => ( $ this -> options [ 'consumeTimeout' ] * 1000 ) , 'trackingScriptUrl' => $ this -> options [ 'trackingScriptUrl' ] , ) ) ; }
Renders simple tracking snippet code.

@param \Twig_Environment $twigEnvironment
@param int|mixed $contentId

@return string
Renders simple tracking snippet code .