Elcodi\Store\ProductBundle\Services\StoreCategoryTree::isCategoryEnabled PHP Method

isCategoryEnabled() protected method

Checks if a category is enabled. A category can be disabled by itself or by other store configurations like the options to only load categories with products.
protected isCategoryEnabled ( Elcodi\Component\Product\Entity\Category $category ) : boolean
$category Elcodi\Component\Product\Entity\Category The category to check.
return boolean If the category is enabled and should be showed on the categories tree.
    protected function isCategoryEnabled(Category $category)
    {
        return $category->isEnabled() && (!$this->loadOnlyCategoriesWithProducts || 0 > $category->getProducts());
    }