/** * @param Options $options * @param mixed $value * @return Category|null */ public function normalizeCategory(Options $options, $value) { if (null === $value) { return null; } if ($value instanceof Category) { return $value; } if ($value instanceof HasNodeInterface) { return $this->contentCategory->getCurrentCategory($value); } return null; }
public function getCurrentCategory(HasNodeInterface $page, $includeHidden = true) { return $this->categoryService->getCurrentCategory($page, $includeHidden); }