Ejemplo n.º 1
0
 public static function getCategory($catId)
 {
     $catModel = new categoryModel(self::$doctrineService);
     $catInfo = $catModel->findOneBy(array('id' => $catId));
     if ($catInfo) {
         return $catInfo;
     }
     return new Categories();
 }
Ejemplo n.º 2
0
 public static function getCategoryForSelect()
 {
     $doctrineService = self::$servicelocator->get('doctrine');
     $categoryModel = new categoryModel($doctrineService);
     $cat = $categoryModel->findBy(array('isdelete' => 0));
     $return = array();
     foreach ($cat as $item) {
         $return[$item->getId()] = $item->getName();
     }
     return $return;
 }