Sulu\Component\Content\Query\ContentQueryBuilder::buildSelectForStructure PHP Method

buildSelectForStructure() private method

Returns select of a single structure with title and url selector.
private buildSelectForStructure ( $locale, Sulu\Component\Content\Compat\StructureInterface $structure, &$names )
$structure Sulu\Component\Content\Compat\StructureInterface
    private function buildSelectForStructure($locale, StructureInterface $structure, &$names)
    {
        $nodeNameProperty = $structure->getProperty('title');
        $result = '';
        $name = $this->getTranslatedProperty($nodeNameProperty, $locale)->getName();
        if (!in_array($name, $names)) {
            $names[] = $name;
            $result .= ', ' . $this->buildSelector($name);
        }
        if ($structure->hasTag('sulu.rlp')) {
            $urlProperty = $structure->getPropertyByTagName('sulu.rlp');
            $name = $this->getTranslatedProperty($urlProperty, $locale)->getName();
            if ($urlProperty->getContentTypeName() !== 'resource_locator' && !in_array($name, $names)) {
                $names[] = $name;
                $result .= ', ' . $this->buildSelector($name);
            }
        }
        return $result;
    }