OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
oxobject2group.php
Go to the documentation of this file.
1 <?php
2 
6 class oxObject2Group extends oxBase
7 {
13  protected $_blDisableShopCheck = true;
14 
20  protected $_sClassName = 'oxobject2group';
21 
25  public function __construct()
26  {
28  $this->init('oxobject2group');
29  $this->oxobject2group__oxshopid = new oxField($this->getConfig()->getShopId(), oxField::T_RAW);
30  }
31 
38  public function save()
39  {
40  $oDb = oxDb::getDb();
41  $sQ = "select 1 from oxobject2group where oxgroupsid = " . $oDb->quote($this->oxobject2group__oxgroupsid->value);
42  $sQ .= " and oxobjectid = " . $oDb->quote($this->oxobject2group__oxobjectid->value);
43 
44  // does not exist
45  if (!$oDb->getOne($sQ, false, false)) {
46  return parent::save();
47  }
48  }
49 }