src/Sulu/Bundle/WebsiteBundle/EventListener/AppendAnalyticsListener.php
protected function setAnalyticsContent($responseContent, array $analyticsContent)
    {
        foreach ($analyticsContent as $id => $content) {
            if (!$content) {
                continue;
            }

            $responseContent = preg_replace(
                self::$positions[$id]['regex'],
                sprintf(self::$positions[$id]['sprintf'], $content),
                $responseContent
            );
        }

        return $responseContent;
    }
protected function setAnalyticsContent($responseContent, array $analyticsContent)
    {
        foreach ($analyticsContent as $id => $content) {
            if (!$content) {
                continue;
            }

            $responseContent = preg_replace(
                self::$positions[$id]['regex'],
                sprintf(self::$positions[$id]['sprintf'], $content),
                $responseContent
            );
        }

        return $responseContent;
    }
protected function setAnalyticsContent ( $ responseContent , array $ analyticsContent ) { foreach ( $ analyticsContent as $ id => $ content ) { if ( ! $ content ) { continue ; } $ responseContent = preg_replace ( self :: $ positions [ $ id ] [ 'regex' ] , sprintf ( self :: $ positions [ $ id ] [ 'sprintf' ] , $ content ) , $ responseContent ) ; } return $ responseContent ; }
Set the generated content for each position.

@param string $responseContent
@param array $analyticsContent

@return string
Set the generated content for each position .