protected function applyCategoryFilterToCollection(\Magento\Catalog\Api\Data\CategoryInterface $category)
    {
        $this->getLayer()->getProductCollection()->addCategoryFilter($category);

        return $this;
    }
protected function applyCategoryFilterToCollection(\Magento\Catalog\Api\Data\CategoryInterface $category)
    {
        $this->getLayer()->getProductCollection()->addCategoryFilter($category);

        return $this;
    }
protected function applyCategoryFilterToCollection ( \ Magento \ Catalog \ Api \ Data \ CategoryInterface $ category ) { $ this -> getLayer ( ) -> getProductCollection ( ) -> addCategoryFilter ( $ category ) ; return $ this ; }
Apply the category filter to the layer product collection.

@param \Magento\Catalog\Api\Data\CategoryInterface $category Category.

@return $this
Apply the category filter to the layer product collection .