Code:
public function getCategoryListData(\XFRM\Entity\Category $category = null)
{
$categoryRepo = $this->getCategoryRepo();
$categories = $categoryRepo->getViewableCategories();
$categoryTree = $categoryRepo->createCategoryTree($categories);
$categoryExtras = $categoryRepo->getCategoryListExtras($categoryTree);
return [
'categories' => $categories,
'categoryTree' => $categoryTree,
'categoryExtras' => $categoryExtras
];
}
As an example, i want to get rid of the cat with ID == 1 from $categories
$categories = $categoryRepo->getViewableCategories();
What can i do here with $categories, please?
$categoryTree = $categoryRepo->createCategoryTree($categories);