src/ShopPrimaryNavigationBundle/objects/TPkgShopPrimaryNaviList.class.php
public static function GetDefaultQuery($iLanguageId, $sFilterString = false)
    {
        $sDefaultQuery = 'SELECT `pkg_shop_primary_navi`.*
                          FROM `pkg_shop_primary_navi`
                         WHERE [{sFilterConditions}]
                      ORDER BY `pkg_shop_primary_navi`.`position` ASC';
        $sActivePrimaryNavigationQueryRestriction = '';
        if (!TGlobal::IsCMSMode()) {
            $sActivePrimaryNavigationQueryRestriction = TdbPkgShopPrimaryNaviList::GetActivePrimaryNavigationQueryRestriction();
        }
        if (strlen($sActivePrimaryNavigationQueryRestriction) > 0) {
            if (false === $sFilterString) {
                $sFilterString = " $sActivePrimaryNavigationQueryRestriction ";
            } else {
                $sFilterString = ' ( '.$sFilterString.' ) AND ('.$sActivePrimaryNavigationQueryRestriction.')';
            }
        } else {
            if (false === $sFilterString) {
                $sFilterString = ' 1 = 1 ';
            }
        }
        $sDefaultQuery = str_replace('[{sFilterConditions}]', $sFilterString, $sDefaultQuery);

        return $sDefaultQuery;
    }
public static function GetDefaultQuery($iLanguageId, $sFilterString = false)
    {
        $sDefaultQuery = 'SELECT `pkg_shop_primary_navi`.*
                          FROM `pkg_shop_primary_navi`
                         WHERE [{sFilterConditions}]
                      ORDER BY `pkg_shop_primary_navi`.`position` ASC';
        $sActivePrimaryNavigationQueryRestriction = '';
        if (!TGlobal::IsCMSMode()) {
            $sActivePrimaryNavigationQueryRestriction = TdbPkgShopPrimaryNaviList::GetActivePrimaryNavigationQueryRestriction();
        }
        if (strlen($sActivePrimaryNavigationQueryRestriction) > 0) {
            if (false === $sFilterString) {
                $sFilterString = " $sActivePrimaryNavigationQueryRestriction ";
            } else {
                $sFilterString = ' ( '.$sFilterString.' ) AND ('.$sActivePrimaryNavigationQueryRestriction.')';
            }
        } else {
            if (false === $sFilterString) {
                $sFilterString = ' 1 = 1 ';
            }
        }
        $sDefaultQuery = str_replace('[{sFilterConditions}]', $sFilterString, $sDefaultQuery);

        return $sDefaultQuery;
    }
public static function GetDefaultQuery ( $ iLanguageId , $ sFilterString = false ) { $ sDefaultQuery = 'SELECT `pkg_shop_primary_navi`.*
                          FROM `pkg_shop_primary_navi`
                         WHERE [{sFilterConditions}]
                      ORDER BY `pkg_shop_primary_navi`.`position` ASC' ; $ sActivePrimaryNavigationQueryRestriction = '' ; if ( ! TGlobal :: IsCMSMode ( ) ) { $ sActivePrimaryNavigationQueryRestriction = TdbPkgShopPrimaryNaviList :: GetActivePrimaryNavigationQueryRestriction ( ) ; } if ( strlen ( $ sActivePrimaryNavigationQueryRestriction ) > 0 ) { if ( false === $ sFilterString ) { $ sFilterString = " $sActivePrimaryNavigationQueryRestriction " ; } else { $ sFilterString = ' ( ' . $ sFilterString . ' ) AND (' . $ sActivePrimaryNavigationQueryRestriction . ')' ; } } else { if ( false === $ sFilterString ) { $ sFilterString = ' 1 = 1 ' ; } } $ sDefaultQuery = str_replace ( '[{sFilterConditions}]' , $ sFilterString , $ sDefaultQuery ) ; return $ sDefaultQuery ; }
return default query for the table.
if not in CMS mode return only active navigation trees.

@param int         $iLanguageId   - language used for query
@param bool|string $sFilterString - any filter conditions to add to the query

@return string
return default query for the table . if not in CMS mode return only active navigation trees .