oxcontentlist.php

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                 // add into cattree
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         // load them
00066         $this->selectString( "select * from oxcontents where ".oxDb::getInstance()->getMultiLangFieldName( 'oxactive').
00067         " = '1' and oxtype = '$iType' and oxsnippet = '0' and oxshopid = '$this->_sShopID' $sSQLAdd order by oxloadid" );
00068     }
00069 }

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