Smile\ElasticsuiteCore\Index\Analysis\Config\Converter::getFiltersByRef PHP Method

getFiltersByRef() private method

Return all filters under a root node filtered by an array of available filters.
private getFiltersByRef ( DOMXPath $xpath, DomNode $rootNode, string $searchPath, array $availableFilters ) : array
$xpath DOMXPath XPath access to the document parsed.
$rootNode DomNode Search root node.
$searchPath string Filters search path.
$availableFilters array List of available filters.
return array
    private function getFiltersByRef(\DOMXPath $xpath, \DomNode $rootNode, $searchPath, array $availableFilters)
    {
        $filters = [];
        $filterNodes = $xpath->query($searchPath, $rootNode);
        foreach ($filterNodes as $filterNode) {
            $filterName = $filterNode->getAttribute('ref');
            if (in_array($filterName, $availableFilters)) {
                $filters[] = $filterName;
            }
        }
        return $filters;
    }