OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
oxgroups.php
Go to the documentation of this file.
1 <?php
2 
8 class oxGroups extends oxI18n
9 {
10 
16  protected $_sClassName = 'oxgroups';
17 
21  public function __construct()
22  {
24  $this->init('oxgroups');
25  }
26 
27 
35  public function delete($sOXID = null)
36  {
37  if (!$sOXID) {
38  $sOXID = $this->getId();
39  }
40  if (!$sOXID) {
41  return false;
42  }
43 
44 
45 
46  parent::delete($sOXID);
47 
48  $oDb = oxDb::getDb();
49 
50 
51  // deleting related data records
52  $sDelete = 'delete from oxobject2group where oxobject2group.oxgroupsid = ' . $oDb->quote($sOXID);
53  $rs = $oDb->execute($sDelete);
54 
55  $sDelete = 'delete from oxobject2delivery where oxobject2delivery.oxobjectid = ' . $oDb->quote($sOXID);
56  $rs = $oDb->execute($sDelete);
57 
58  $sDelete = 'delete from oxobject2discount where oxobject2discount.oxobjectid = ' . $oDb->quote($sOXID);
59  $rs = $oDb->execute($sDelete);
60 
61  $sDelete = 'delete from oxobject2payment where oxobject2payment.oxobjectid = ' . $oDb->quote($sOXID);
62  $rs = $oDb->execute($sDelete);
63 
64  return $rs->EOF;
65  }
66 
67 }