Example #1
0
 public function getCategoryById(int $id)
 {
     $categoryQuery = new Shopware_StoreApi_Models_Query_Category();
     $categoryQuery->addCriterion(new Shopware_StoreApi_Models_Query_Criterion_Id($id));
     $searchResult = $this->getCategories($categoryQuery);
     if ($searchResult instanceof Shopware_StoreApi_Exception_Response) {
         return $searchResult;
     }
     return current($searchResult->getCollection());
 }