public function getProductCategories() { $categoryList = array(); $productCategories = new Products_Model_ProductCategoryGateway(); $categories = $productCategories->fetchProductCategories(); foreach ($categories as $category) { $categoryList[$category['product_category_id']] = $category['product_category_name']; } return $categoryList; }
/** * Get a list of Categories and Build * the Select List for the Product Form */ public function getProductCategories() { $categoryList = array(); $productCategories = new Products_Model_ProductCategoryGateway(); $categories = $productCategories->fetchProductCategories(); if (!$categories) { return null; } $categories = $categories->toArray(); //Build Product Category Select List $categoryList[''] = '***Select Product Type***'; foreach ($categories as $category) { $categoryList[$category['product_category_id']] = $category['product_category_name']; } return $categoryList; }