src/Sulu/Component/Content/SmartContent/QueryBuilder.php
private function buildCategoriesWhere($categories, $operator, $languageCode)
    {
        $structure = $this->structureManager->getStructure('excerpt');

        $sql2Where = [];
        if ($structure->hasProperty('categories')) {
            $property = new TranslatedProperty(
                $structure->getProperty('categories'),
                $languageCode,
                $this->languageNamespace,
                'excerpt'
            );
            foreach ($categories as $category) {
                $sql2Where[] = 'page.[' . $property->getName() . '] = ' . $category;
            }

            if (count($sql2Where) > 0) {
                return '(' . implode(' ' . strtoupper($operator) . ' ', $sql2Where) . ')';
            }
        }

        return '';
    }
private function buildCategoriesWhere($categories, $operator, $languageCode)
    {
        $structure = $this->structureManager->getStructure('excerpt');

        $sql2Where = [];
        if ($structure->hasProperty('categories')) {
            $property = new TranslatedProperty(
                $structure->getProperty('categories'),
                $languageCode,
                $this->languageNamespace,
                'excerpt'
            );
            foreach ($categories as $category) {
                $sql2Where[] = 'page.[' . $property->getName() . '] = ' . $category;
            }

            if (count($sql2Where) > 0) {
                return '(' . implode(' ' . strtoupper($operator) . ' ', $sql2Where) . ')';
            }
        }

        return '';
    }
private function buildCategoriesWhere ( $ categories , $ operator , $ languageCode ) { $ structure = $ this -> structureManager -> getStructure ( 'excerpt' ) ; $ sql2Where = [ ] ; if ( $ structure -> hasProperty ( 'categories' ) ) { $ property = new TranslatedProperty ( $ structure -> getProperty ( 'categories' ) , $ languageCode , $ this -> languageNamespace , 'excerpt' ) ; foreach ( $ categories as $ category ) { $ sql2Where [ ] = 'page.[' . $ property -> getName ( ) . '] = ' . $ category ; } if ( count ( $ sql2Where ) > 0 ) { return '(' . implode ( ' ' . strtoupper ( $ operator ) . ' ' , $ sql2Where ) . ')' ; } } return '' ; }
build categories where clauses.
build categories where clauses .