public function process(PricingSetInterface $pricingSet, $context = null)
    {
        //Temporary hack to assure valueElement exists (when loaded from persistence)
        $rp = new \ReflectionProperty($pricingSet, 'valueElement');
        $rp->setAccessible(true);

        if (null == $rp->getValue($pricingSet)) {
            $rp->setValue($pricingSet, new TotalDoughValueElement());
        }
        $rp->setAccessible(false);

        //Process the pricing set and inject the context
        $newPricingSet = $pricingSet->process($context);

        return $newPricingSet;
    }
public function process(PricingSetInterface $pricingSet, $context = null)
    {
        //Temporary hack to assure valueElement exists (when loaded from persistence)
        $rp = new \ReflectionProperty($pricingSet, 'valueElement');
        $rp->setAccessible(true);

        if (null == $rp->getValue($pricingSet)) {
            $rp->setValue($pricingSet, new TotalDoughValueElement());
        }
        $rp->setAccessible(false);

        //Process the pricing set and inject the context
        $newPricingSet = $pricingSet->process($context);

        return $newPricingSet;
    }
public function process ( PricingSetInterface $ pricingSet , $ context = null ) { //Temporary hack to assure valueElement exists (when loaded from persistence) $ rp = new \ ReflectionProperty ( $ pricingSet , 'valueElement' ) ; $ rp -> setAccessible ( true ) ; if ( null == $ rp -> getValue ( $ pricingSet ) ) { $ rp -> setValue ( $ pricingSet , new TotalDoughValueElement ( ) ) ; } $ rp -> setAccessible ( false ) ; //Process the pricing set and inject the context $ newPricingSet = $ pricingSet -> process ( $ context ) ; return $ newPricingSet ; }
Process an existing pricing set

For instance a product pricing instance needs additional processing to inject the
current tax rate of the customer to display the correct gross price

@param PricingSetInterface $pricingSet
@param null $context
@return mixed
Process an existing pricing set