oxattribute.php

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

Generated on Wed Apr 22 12:26:30 2009 for OXID eShop CE by  doxygen 1.5.5