oxselectlist.php

Go to the documentation of this file.
00001 <?php
00002 
00005 class oxSelectlist extends oxI18n
00006 {
00011     protected $_aFieldList = null;
00012 
00017     protected $_sClassName = 'oxselectlist';
00018 
00027     public function __construct( $sObjectsInListName = 'oxselectlist')
00028     {
00029         parent::__construct();
00030         $this->init( 'oxselectlist' );
00031     }
00032 
00040     public function getFieldList( $dVat = null )
00041     {
00042         if ( $this->_aFieldList == null && $this->oxselectlist__oxvaldesc->value ) {
00043             $oStr = getStr();
00044             $this->_aFieldList = oxUtils::getInstance()->assignValuesFromText( $this->oxselectlist__oxvaldesc->getRawValue(), $dVat );
00045             foreach ( $this->_aFieldList as $sKey => $oField ) {
00046                 $this->_aFieldList[$sKey]->name = $oStr->htmlspecialchars( strip_tags( $this->_aFieldList[$sKey]->name ), false );
00047             }
00048         }
00049         return $this->_aFieldList;
00050     }
00051 
00059     public function delete( $sOXID = null )
00060     {
00061         if ( !$sOXID ) {
00062             $sOXID = $this->getId();
00063         }
00064         if ( !$sOXID ) {
00065             return false;
00066         }
00067 
00068         // remove selectlists from articles also
00069         if ( $blRemove = parent::delete( $sOXID ) ) {
00070             oxDb::getDb()->execute( "delete from oxobject2selectlist where oxselnid = '$sOXID' " );
00071         }
00072 
00073         return $blRemove;
00074     }
00075 }

Generated on Tue Apr 21 15:45:45 2009 for OXID eShop CE by  doxygen 1.5.5