00001 <?php
00002
00006 class oxSelectlist extends oxI18n
00007 {
00012 protected $_aFieldList = null;
00013
00018 protected $_sClassName = 'oxselectlist';
00019
00028 public function __construct( $sObjectsInListName = 'oxselectlist')
00029 {
00030 parent::__construct();
00031 $this->init( 'oxselectlist' );
00032 }
00033
00039 public function getFieldList()
00040 {
00041 if ( $this->_aFieldList == null && $this->oxselectlist__oxvaldesc->value ) {
00042 $this->_aFieldList = oxUtils::getInstance()->assignValuesFromText( $this->oxselectlist__oxvaldesc->value );
00043 foreach ( $this->_aFieldList as $sKey => $oField ) {
00044 $this->_aFieldList[$sKey]->name = htmlspecialchars( $this->_aFieldList[$sKey]->name );
00045 }
00046 }
00047 return $this->_aFieldList;
00048 }
00049
00057 public function delete( $sOXID = null )
00058 {
00059 if ( !$sOXID ) {
00060 $sOXID = $this->getId();
00061 }
00062 if ( !$sOXID ) {
00063 return false;
00064 }
00065
00066
00067 if ( $blRemove = parent::delete( $sOXID ) ) {
00068 oxDb::getDb()->execute( "delete from oxobject2selectlist where oxselnid = '$sOXID' " );
00069 }
00070
00071 return $blRemove;
00072 }
00073 }