oxobject2group.php

Go to the documentation of this file.
00001 <?php
00002 
00006 class oxObject2Group extends oxBase
00007 {
00013     protected $_blDisableShopCheck = true;
00014 
00020     protected $_sClassName = 'oxobject2group';
00021 
00025     public function __construct()
00026     {
00027         parent::__construct();
00028         $this->init('oxobject2group');
00029         $this->oxobject2group__oxshopid = new oxField($this->getConfig()->getShopId(), oxField::T_RAW);
00030     }
00031 
00038     public function save()
00039     {
00040         $oDb = oxDb::getDb();
00041         $sQ = "select 1 from oxobject2group where oxgroupsid = " . $oDb->quote($this->oxobject2group__oxgroupsid->value);
00042         $sQ .= " and oxobjectid = " . $oDb->quote($this->oxobject2group__oxobjectid->value);
00043 
00044         // does not exist
00045         if (!$oDb->getOne($sQ, false, false)) {
00046             return parent::save();
00047         }
00048     }
00049 }