protected function _checkReferences( $prodId, $domain, $listTypeId, array $refIds )
	{
		$productManager = MShop_Factory::createManager( $this->_getContext(), 'product' );
		$search = $productManager->createSearch( true );

		$expr = array(
			$search->compare( '==', 'product.id', $prodId ),
			$search->getConditions(),
		);

		if( count( $refIds ) > 0 )
		{
			$param = array( $domain, $listTypeId, $refIds );
			$cmpfunc = $search->createFunction( 'product.contains', $param );

			$expr[] = $search->compare( '==', $cmpfunc, count( $refIds ) );
		}

		$search->setConditions( $search->combine( '&&', $expr ) );

		if( count( $productManager->searchItems( $search, array() ) ) === 0 )
		{
			$msg = sprintf( 'Invalid "%1$s" references for product with ID "%2$s"', $domain, $prodId );
			throw new Controller_Frontend_Basket_Exception( $msg );
		}
	}
protected function _checkReferences( $prodId, $domain, $listTypeId, array $refIds )
	{
		$productManager = MShop_Factory::createManager( $this->_getContext(), 'product' );
		$search = $productManager->createSearch( true );

		$expr = array(
			$search->compare( '==', 'product.id', $prodId ),
			$search->getConditions(),
		);

		if( count( $refIds ) > 0 )
		{
			$param = array( $domain, $listTypeId, $refIds );
			$cmpfunc = $search->createFunction( 'product.contains', $param );

			$expr[] = $search->compare( '==', $cmpfunc, count( $refIds ) );
		}

		$search->setConditions( $search->combine( '&&', $expr ) );

		if( count( $productManager->searchItems( $search, array() ) ) === 0 )
		{
			$msg = sprintf( 'Invalid "%1$s" references for product with ID "%2$s"', $domain, $prodId );
			throw new Controller_Frontend_Basket_Exception( $msg );
		}
	}
protected function _checkReferences ( $ prodId , $ domain , $ listTypeId , array $ refIds ) { $ productManager = MShop_Factory :: createManager ( $ this -> _getContext ( ) , 'product' ) ; $ search = $ productManager -> createSearch ( true ) ; $ expr = array ( $ search -> compare ( '==' , 'product.id' , $ prodId ) , $ search -> getConditions ( ) , ) ; if ( count ( $ refIds ) > 0 ) { $ param = array ( $ domain , $ listTypeId , $ refIds ) ; $ cmpfunc = $ search -> createFunction ( 'product.contains' , $ param ) ; $ expr [ ] = $ search -> compare ( '==' , $ cmpfunc , count ( $ refIds ) ) ; } $ search -> setConditions ( $ search -> combine ( '&&' , $ expr ) ) ; if ( count ( $ productManager -> searchItems ( $ search , array ( ) ) ) === 0 ) { $ msg = sprintf ( 'Invalid "%1$s" references for product with ID "%2$s"' , $ domain , $ prodId ) ; throw new Controller_Frontend_Basket_Exception ( $ msg ) ; } }
Checks if the IDs of the given items are really associated to the product.

@param string $prodId Unique ID of the product
@param string $domain Domain the references must be of
@param integer $listTypeId ID of the list type the referenced items must be
@param array $refIds List of IDs that must be associated to the product
@throws Controller_Frontend_Basket_Exception If one or more of the IDs are not associated
Checks if the IDs of the given items are really associated to the product .