コード例 #1
0
 /**
  * Returns category items
  *
  * @param string $alias
  * @return array
  */
 public function getCategoryItems($alias)
 {
     $categories = $this->categoryService->getCategoriesByAlias($alias);
     if (count($categories) === 0) {
         return [];
     }
     $categoryIDs = array_map(function (Category $category) {
         return $category->id;
     }, $categories);
     return $this->itemStorage->getCategoriesItems($categoryIDs);
 }