private function _createProductListFilter( $text, $catid, $sort, $sortdir, $page, $size, $catfilter, $textfilter )
	{
		$controller = Controller_Frontend_Factory::createController( $this->_getContext(), 'catalog' );

		if( $text !== '' && $textfilter === true )
		{
			$filter = $controller->createProductFilterByText( $text, $sort, $sortdir, ($page-1) * $size, $size );

			if( $catid !== '' && $catfilter === true ) {
				$filter = $controller->addProductFilterCategory( $filter, $catid );
			}

			return $filter;
		}
		elseif( $catid !== '' && $catfilter === true )
		{
			return $controller->createProductFilterByCategory( $catid, $sort, $sortdir, ($page-1) * $size, $size );
		}
		else
		{
			return $controller->createProductFilterDefault( $sort, $sortdir, ($page-1) * $size, $size );
		}
	}
private function _createProductListFilter( $text, $catid, $sort, $sortdir, $page, $size, $catfilter, $textfilter )
	{
		$controller = Controller_Frontend_Factory::createController( $this->_getContext(), 'catalog' );

		if( $text !== '' && $textfilter === true )
		{
			$filter = $controller->createProductFilterByText( $text, $sort, $sortdir, ($page-1) * $size, $size );

			if( $catid !== '' && $catfilter === true ) {
				$filter = $controller->addProductFilterCategory( $filter, $catid );
			}

			return $filter;
		}
		elseif( $catid !== '' && $catfilter === true )
		{
			return $controller->createProductFilterByCategory( $catid, $sort, $sortdir, ($page-1) * $size, $size );
		}
		else
		{
			return $controller->createProductFilterDefault( $sort, $sortdir, ($page-1) * $size, $size );
		}
	}
private function _createProductListFilter ( $ text , $ catid , $ sort , $ sortdir , $ page , $ size , $ catfilter , $ textfilter ) { $ controller = Controller_Frontend_Factory :: createController ( $ this -> _getContext ( ) , 'catalog' ) ; if ( $ text !== '' && $ textfilter === true ) { $ filter = $ controller -> createProductFilterByText ( $ text , $ sort , $ sortdir , ( $ page - 1 ) * $ size , $ size ) ; if ( $ catid !== '' && $ catfilter === true ) { $ filter = $ controller -> addProductFilterCategory ( $ filter , $ catid ) ; } return $ filter ; } elseif ( $ catid !== '' && $ catfilter === true ) { return $ controller -> createProductFilterByCategory ( $ catid , $ sort , $ sortdir , ( $ page - 1 ) * $ size , $ size ) ; } else { return $ controller -> createProductFilterDefault ( $ sort , $ sortdir , ( $ page - 1 ) * $ size , $ size ) ; } }
Creates the filter from the given parameters for the product list.

@param string $text Text to search for
@param string $catid Category ID to search for
@param string $sort Sortation string (relevance, name, price)
@param string $sortdir Sortation direction (+ or -)
@param integer $page Page number starting from 1
@param integer $size Page size
@param boolean $catfilter True to include catalog criteria in product filter, false if not
@param boolean $textfilter True to include text criteria in product filter, false if not
@return MW_Common_Criteria_Interface Search criteria object
Creates the filter from the given parameters for the product list .