protected function buildSolrHierarchyFromIdRootline(array $idRootline)
    {
        $hierarchy = [];

        $depth = 0;
        $currentPath = array_shift($idRootline);
        if (is_null($currentPath)) {
            return $hierarchy;
        }

        foreach ($idRootline as $uid) {
            $hierarchy[] = $depth . '-' . $currentPath . '/';

            $depth++;
            $currentPath .= '/' . $uid;
        }
        $hierarchy[] = $depth . '-' . $currentPath . '/';

        return $hierarchy;
    }
protected function buildSolrHierarchyFromIdRootline(array $idRootline)
    {
        $hierarchy = [];

        $depth = 0;
        $currentPath = array_shift($idRootline);
        if (is_null($currentPath)) {
            return $hierarchy;
        }

        foreach ($idRootline as $uid) {
            $hierarchy[] = $depth . '-' . $currentPath . '/';

            $depth++;
            $currentPath .= '/' . $uid;
        }
        $hierarchy[] = $depth . '-' . $currentPath . '/';

        return $hierarchy;
    }
protected function buildSolrHierarchyFromIdRootline ( array $ idRootline ) { $ hierarchy = [ ] ; $ depth = 0 ; $ currentPath = array_shift ( $ idRootline ) ; if ( is_null ( $ currentPath ) ) { return $ hierarchy ; } foreach ( $ idRootline as $ uid ) { $ hierarchy [ ] = $ depth . '-' . $ currentPath . '/' ; $ depth ++ ; $ currentPath .= '/' . $ uid ; } $ hierarchy [ ] = $ depth . '-' . $ currentPath . '/' ; return $ hierarchy ; }
Builds a Solr hierarchy from an array of uids that make up a rootline.

@param array $idRootline Array of Ids representing a rootline
@return array Solr hierarchy
@see http://wiki.apache.org/solr/HierarchicalFaceting
Builds a Solr hierarchy from an array of uids that make up a rootline .