/** * Gets a new category entity class. * * @param int $id The id to set to the entity. * @param bool $isRoot If the category is a root category. * @param Category|null $parentCategory The category to set as parent * * @return Category */ public function getCategoryEntity($id, $isRoot, $parentCategory) { $category = new Category(); $category->setId($id); $category->setRoot($isRoot); $category->setParent($parentCategory); return $category; }