Partial/PartialNode.php
public static function excludeEverythingNotInBreadcrumbPath(ArrayNode $node, $breadcrumbPath)
    {
        if ($breadcrumbPath === null) {
            return;
        }

        $path = explode('.', $breadcrumbPath);

        self::excludeEverythingNotInPath($node, $path);
    }
public static function excludeEverythingNotInBreadcrumbPath(ArrayNode $node, $breadcrumbPath)
    {
        if ($breadcrumbPath === null) {
            return;
        }

        $path = explode('.', $breadcrumbPath);

        self::excludeEverythingNotInPath($node, $path);
    }
Provide an ArrayNode instance (e.g. the root node created by a TreeBuilder) and a path that is relevant to you,
e.g. "dbal.connections": this will strip every node that is not contained in the given path (e.g. the "orm" node
would be removed entirely.

@param ArrayNode $node
@param string    $breadcrumbPath