protected function buildSolrHierarchyFromPath($path)
    {
        $hierarchy = [];
        $path = HierarchyTool::substituteSlashes($path);

        $treeParts = GeneralUtility::trimExplode('/', $path, true);
        $currentTreeParts = [];

        foreach ($treeParts as $i => $part) {
            $currentTreeParts[] = $part;
            $hierarchyString = $i . '-' . implode('/', $currentTreeParts) . '/';
            $hierarchyString = HierarchyTool::unSubstituteSlashes($hierarchyString);
            $hierarchy[] = $hierarchyString;
        }

        return $hierarchy;
    }
protected function buildSolrHierarchyFromPath($path)
    {
        $hierarchy = [];
        $path = HierarchyTool::substituteSlashes($path);

        $treeParts = GeneralUtility::trimExplode('/', $path, true);
        $currentTreeParts = [];

        foreach ($treeParts as $i => $part) {
            $currentTreeParts[] = $part;
            $hierarchyString = $i . '-' . implode('/', $currentTreeParts) . '/';
            $hierarchyString = HierarchyTool::unSubstituteSlashes($hierarchyString);
            $hierarchy[] = $hierarchyString;
        }

        return $hierarchy;
    }
protected function buildSolrHierarchyFromPath ( $ path ) { $ hierarchy = [ ] ; $ path = HierarchyTool :: substituteSlashes ( $ path ) ; $ treeParts = GeneralUtility :: trimExplode ( '/' , $ path , true ) ; $ currentTreeParts = [ ] ; foreach ( $ treeParts as $ i => $ part ) { $ currentTreeParts [ ] = $ part ; $ hierarchyString = $ i . '-' . implode ( '/' , $ currentTreeParts ) . '/' ; $ hierarchyString = HierarchyTool :: unSubstituteSlashes ( $ hierarchyString ) ; $ hierarchy [ ] = $ hierarchyString ; } return $ hierarchy ; }
Builds a Solr hierarchy from path string.

@param string $path path string
@return array Solr hierarchy
@see http://wiki.apache.org/solr/HierarchicalFaceting
Builds a Solr hierarchy from path string .