Go to the documentation of this file.00001 <?php
00002
00007 class oxContentList extends oxList
00008 {
00016 public function __construct( $sObjectsInListName = 'oxcontent' )
00017 {
00018 parent::__construct( 'oxcontent');
00019 }
00020
00026 public function loadMainMenulist()
00027 {
00028 $this->_loadMenue( 1 );
00029 }
00030
00036 public function loadCatMenues()
00037 {
00038 $this->_loadMenue( 2, 'and oxcatid is not null' );
00039 $aArray = array();
00040
00041 if ( $this->count() ) {
00042 foreach ( $this as $oContent ) {
00043
00044 if ( !isset( $aArray[$oContent->oxcontents__oxcatid->value] ) ) {
00045 $aArray[$oContent->oxcontents__oxcatid->value] = array();
00046 }
00047
00048 $aArray[$oContent->oxcontents__oxcatid->value][] = $oContent;
00049 }
00050 }
00051
00052 $this->_aArray = $aArray;
00053 }
00054
00063 protected function _loadMenue( $iType, $sSQLAdd = null )
00064 {
00065
00066 $iType = (int)$iType;
00067 $sViewName = $this->getBaseObject()->getViewName();
00068 $this->selectString( "select * from {$sViewName} where oxactive = '1' and oxtype = '$iType' and oxsnippet = '0' and oxshopid = '$this->_sShopID' $sSQLAdd order by oxloadid" );
00069 }
00070 }