private function getCategoryFilterParam(\Magento\Catalog\Model\Category $category)
    {
        $filterParam = $category->getId();

        if ($category->getVirtualRule()) { // Implicit dependency to Virtual Categories module.
            $category->setIsActive(true);

            $filterParam = $category->getVirtualRule()->getCategorySearchQuery($category);
        }

        return $filterParam;
    }
private function getCategoryFilterParam(\Magento\Catalog\Model\Category $category)
    {
        $filterParam = $category->getId();

        if ($category->getVirtualRule()) { // Implicit dependency to Virtual Categories module.
            $category->setIsActive(true);

            $filterParam = $category->getVirtualRule()->getCategorySearchQuery($category);
        }

        return $filterParam;
    }
private function getCategoryFilterParam ( \ Magento \ Catalog \ Model \ Category $ category ) { $ filterParam = $ category -> getId ( ) ; if ( $ category -> getVirtualRule ( ) ) { // Implicit dependency to Virtual Categories module. $ category -> setIsActive ( true ) ; $ filterParam = $ category -> getVirtualRule ( ) -> getCategorySearchQuery ( $ category ) ; } return $ filterParam ; }
Return category filter param

@param \Magento\Catalog\Model\Category $category Category.

@return int|QueryInterface
Return category filter param