src/ShopListFilterBundle/objects/db/TPkgShopListfilterItemList.class.php
public function GetQueryRestriction($oExcludeItem = null, $bReturnAsArray = false)
    {
        $sQuery = '';
        $aQueryItems = array();
        $iPointer = $this->getItemPointer();
        $this->GoToStart();
        while ($oItem = $this->Next()) {
            if (is_null($oExcludeItem) || !$oExcludeItem->IsSameAs($oItem)) {
                $sTmpQuery = trim($oItem->GetQueryRestrictionForActiveFilter());
                if (!empty($sTmpQuery)) {
                    $aQueryItems[] = $sTmpQuery;
                }
            }
        }
        $this->setItemPointer($iPointer);
        if (!$bReturnAsArray) {
            if (count($aQueryItems)) {
                $sQuery = '('.implode(') AND (', $aQueryItems).')';
            }

            return $sQuery;
        } else {
            return $aQueryItems;
        }
    }
public function GetQueryRestriction($oExcludeItem = null, $bReturnAsArray = false)
    {
        $sQuery = '';
        $aQueryItems = array();
        $iPointer = $this->getItemPointer();
        $this->GoToStart();
        while ($oItem = $this->Next()) {
            if (is_null($oExcludeItem) || !$oExcludeItem->IsSameAs($oItem)) {
                $sTmpQuery = trim($oItem->GetQueryRestrictionForActiveFilter());
                if (!empty($sTmpQuery)) {
                    $aQueryItems[] = $sTmpQuery;
                }
            }
        }
        $this->setItemPointer($iPointer);
        if (!$bReturnAsArray) {
            if (count($aQueryItems)) {
                $sQuery = '('.implode(') AND (', $aQueryItems).')';
            }

            return $sQuery;
        } else {
            return $aQueryItems;
        }
    }
public function GetQueryRestriction ( $ oExcludeItem = null , $ bReturnAsArray = false ) { $ sQuery = '' ; $ aQueryItems = array ( ) ; $ iPointer = $ this -> getItemPointer ( ) ; $ this -> GoToStart ( ) ; while ( $ oItem = $ this -> Next ( ) ) { if ( is_null ( $ oExcludeItem ) || ! $ oExcludeItem -> IsSameAs ( $ oItem ) ) { $ sTmpQuery = trim ( $ oItem -> GetQueryRestrictionForActiveFilter ( ) ) ; if ( ! empty ( $ sTmpQuery ) ) { $ aQueryItems [ ] = $ sTmpQuery ; } } } $ this -> setItemPointer ( $ iPointer ) ; if ( ! $ bReturnAsArray ) { if ( count ( $ aQueryItems ) ) { $ sQuery = '(' . implode ( ') AND (' , $ aQueryItems ) . ')' ; } return $ sQuery ; } else { return $ aQueryItems ; } }
return sql condition for the current filter list. optionaly excluding the element passed.

@param TdbPkgShopListfilterItem $oExcludeItem
@param bool                     $bReturnAsArray - set to true if you want an array with the query parts instead of a string

@return string
return sql condition for the current filter list . optionaly excluding the element passed .