src/Sulu/Component/Content/SmartContent/QueryBuilder.php
private function buildAudienceTargeting($targetGroupId, $locale)
    {
        if (!$targetGroupId) {
            return;
        }

        $structure = $this->structureManager->getStructure('excerpt');

        $property = new TranslatedProperty(
            $structure->getProperty('audience_targeting_groups'),
            $locale,
            $this->languageNamespace,
            'excerpt'
        );

        return 'page.[' . $property->getName() . '] = ' . $targetGroupId;
    }
private function buildAudienceTargeting($targetGroupId, $locale)
    {
        if (!$targetGroupId) {
            return;
        }

        $structure = $this->structureManager->getStructure('excerpt');

        $property = new TranslatedProperty(
            $structure->getProperty('audience_targeting_groups'),
            $locale,
            $this->languageNamespace,
            'excerpt'
        );

        return 'page.[' . $property->getName() . '] = ' . $targetGroupId;
    }
private function buildAudienceTargeting ( $ targetGroupId , $ locale ) { if ( ! $ targetGroupId ) { return ; } $ structure = $ this -> structureManager -> getStructure ( 'excerpt' ) ; $ property = new TranslatedProperty ( $ structure -> getProperty ( 'audience_targeting_groups' ) , $ locale , $ this -> languageNamespace , 'excerpt' ) ; return 'page.[' . $ property -> getName ( ) . '] = ' . $ targetGroupId ; }
Returns the where part for the audience targeting.

@param string $targetGroupId
@param string $locale

@return string
Returns the where part for the audience targeting .