Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection::addCategoryFilter PHP Method

addCategoryFilter() public method

{@inheritDoc}
public addCategoryFilter ( Magento\Catalog\Model\Category $category )
$category Magento\Catalog\Model\Category
    public function addCategoryFilter(\Magento\Catalog\Model\Category $category)
    {
        $categoryId = $category;
        if (is_object($category)) {
            $categoryId = $category->getId();
        }
        $this->addFieldToFilter('category_ids', $categoryId);
        $this->_productLimitationFilters['category_ids'] = $categoryId;
        return $this;
    }