Ejemplo n.º 1
0
 public static function getGroupsForProduct(StoreProduct $product)
 {
     $db = Database::connection();
     $em = $db->getEntityManager();
     $groups = $em->getRepository('Concrete\\Package\\VividStore\\Src\\VividStore\\Product\\ProductGroup')->findBy(array('pID' => $product->getProductID()));
     foreach ($groups as $key => $value) {
         $group = new StoreGroup\Group();
         $groups[$key]->gName = $group->getByID($groups[$key]->gID)->getGroupName();
     }
     return $groups;
 }
Ejemplo n.º 2
0
 public function deletegroup($gID)
 {
     StoreGroup::getByID($gID)->remove();
 }