/** * Match configuration with current request * * @throws \InvalidArgumentException * @param $categoryId * @return mixed */ public function match($categoryId) { $this->filterAccessible = false; if (!$this->optionHelper->hasEnabledCategories()) { $this->filterAccessible = true; } if (in_array($categoryId, $this->optionHelper->getEnabledCategoryIds())) { $this->filterAccessible = true; } return $this; }