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; }
public function deletegroup($gID) { StoreGroup::getByID($gID)->remove(); }