source/Application/Model/ContentList.php
protected function _getSQLByType($iType)
    {
        $sSQLAdd = '';
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sSQLType = " AND `oxtype` = " . $oDb->quote($iType);

        if ($iType == self::TYPE_CATEGORY_MENU) {
            $sSQLAdd = " AND `oxcatid` IS NOT NULL AND `oxsnippet` = '0'";
        }

        if ($iType == self::TYPE_SERVICE_LIST) {
            $sIdents = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($this->getServiceKeys()));
            $sSQLAdd = " AND OXLOADID IN (" . $sIdents . ")";
            $sSQLType = '';
        }
        $sViewName = $this->getBaseObject()->getViewName();
        $sSql = "SELECT * FROM {$sViewName} WHERE `oxactive` = '1' $sSQLType AND `oxshopid` = " . $oDb->quote($this->_sShopID) . " $sSQLAdd ORDER BY `oxloadid`";

        return $sSql;
    }
protected function _getSQLByType($iType)
    {
        $sSQLAdd = '';
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sSQLType = " AND `oxtype` = " . $oDb->quote($iType);

        if ($iType == self::TYPE_CATEGORY_MENU) {
            $sSQLAdd = " AND `oxcatid` IS NOT NULL AND `oxsnippet` = '0'";
        }

        if ($iType == self::TYPE_SERVICE_LIST) {
            $sIdents = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($this->getServiceKeys()));
            $sSQLAdd = " AND OXLOADID IN (" . $sIdents . ")";
            $sSQLType = '';
        }
        $sViewName = $this->getBaseObject()->getViewName();
        $sSql = "SELECT * FROM {$sViewName} WHERE `oxactive` = '1' $sSQLType AND `oxshopid` = " . $oDb->quote($this->_sShopID) . " $sSQLAdd ORDER BY `oxloadid`";

        return $sSql;
    }
protected function _getSQLByType ( $ iType ) { $ sSQLAdd = '' ; $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sSQLType = " AND `oxtype` = " . $ oDb -> quote ( $ iType ) ; if ( $ iType == self :: TYPE_CATEGORY_MENU ) { $ sSQLAdd = " AND `oxcatid` IS NOT NULL AND `oxsnippet` = '0'" ; } if ( $ iType == self :: TYPE_SERVICE_LIST ) { $ sIdents = implode ( ", " , \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quoteArray ( $ this -> getServiceKeys ( ) ) ) ; $ sSQLAdd = " AND OXLOADID IN (" . $ sIdents . ")" ; $ sSQLType = '' ; } $ sViewName = $ this -> getBaseObject ( ) -> getViewName ( ) ; $ sSql = "SELECT * FROM {$sViewName} WHERE `oxactive` = '1' $sSQLType AND `oxshopid` = " . $ oDb -> quote ( $ this -> _sShopID ) . " $sSQLAdd ORDER BY `oxloadid`" ; return $ sSql ; }
Creates SQL by type.

@param integer $iType type.

@return string
Creates SQL by type .