oxattribute.php

Go to the documentation of this file.
00001 <?php
00002 
00008 class oxAttribute extends oxI18n
00009 {
00015     protected $_sClassName = 'oxattribute';
00016 
00022     protected $_sCoreTbl = 'oxattribute';
00023 
00027     public function __construct()
00028     {
00029         parent::__construct();
00030         $this->init( $this->_sCoreTbl);
00031     }
00032 
00040     public function delete( $sOXID = null )
00041     {
00042         if( !$sOXID)
00043             $sOXID = $this->getId();
00044         if( !$sOXID)
00045             return false;
00046 
00047 
00048         // remove attributes from articles also
00049         $oDB = oxDb::getDb();
00050         $sDelete = "delete from oxobject2attribute where oxattrid = '$sOXID' ";
00051         $rs = $oDB->execute( $sDelete);
00052 
00053         // #657 ADDITIONAL removes attribute connection to category
00054         $sDelete = "delete from oxcategory2attribute where oxattrid = '$sOXID' ";
00055         $rs = $oDB->execute( $sDelete);
00056 
00057         return parent::delete( $sOXID);
00058     }
00059 }

Generated on Thu Dec 4 12:04:56 2008 for OXID eShop CE by  doxygen 1.5.5