oxcontentlist.php

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

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