Fenos\Notifynder\Categories\CategoryManager::find PHP Method

find() public method

Find a category by id.
public find ( $categoryId ) : mixed
$categoryId
return mixed
    public function find($categoryId)
    {
        $category = $this->categoryRepo->find($categoryId);
        if (is_null($category)) {
            $error = 'Category Not Found';
            throw new CategoryNotFoundException($error);
        }
        return $category;
    }