PHP Class Sonata\PaymentBundle\Consumer\PaymentProcessOrderElementConsumer

Author: Sylvain Deloux ([email protected])
Inheritance: implements Sonata\NotificationBundle\Consumer\ConsumerInterface
Datei anzeigen Open project: sonata-project/ecommerce

Protected Properties

Property Type Description
$orderElementManager Sonata\CoreBundle\Model\ManagerInterface
$productPool Sonata\Component\Product\Pool

Public Methods

Method Description
__construct ( Sonata\CoreBundle\Model\ManagerInterface $orderElementManager, Pool $productPool )
generateDiffValue ( integer $transactionStatus, integer $orderStatus, integer $quantity ) : integer Calculate diff value for Product stock update (base on Transaction and Order statuses).
process ( Sonata\NotificationBundle\Consumer\ConsumerEvent $event )

Protected Methods

Method Description
getProductManager ( string $productType ) : Sonata\CoreBundle\Model\ManagerInterface Get the Manager of the given Product.
getProductProvider ( string $productType ) : Sonata\Component\Product\ProductProviderInterface Get the ProductProvider of the given Product.

Method Details

__construct() public method

public __construct ( Sonata\CoreBundle\Model\ManagerInterface $orderElementManager, Pool $productPool )
$orderElementManager Sonata\CoreBundle\Model\ManagerInterface
$productPool Sonata\Component\Product\Pool

generateDiffValue() public method

Calculate diff value for Product stock update (base on Transaction and Order statuses).
public generateDiffValue ( integer $transactionStatus, integer $orderStatus, integer $quantity ) : integer
$transactionStatus integer
$orderStatus integer
$quantity integer
return integer

getProductManager() protected method

Get the Manager of the given Product.
protected getProductManager ( string $productType ) : Sonata\CoreBundle\Model\ManagerInterface
$productType string
return Sonata\CoreBundle\Model\ManagerInterface

getProductProvider() protected method

Get the ProductProvider of the given Product.
protected getProductProvider ( string $productType ) : Sonata\Component\Product\ProductProviderInterface
$productType string
return Sonata\Component\Product\ProductProviderInterface

process() public method

public process ( Sonata\NotificationBundle\Consumer\ConsumerEvent $event )
$event Sonata\NotificationBundle\Consumer\ConsumerEvent

Property Details

$orderElementManager protected_oe property

protected ManagerInterface,Sonata\CoreBundle\Model $orderElementManager
return Sonata\CoreBundle\Model\ManagerInterface

$productPool protected_oe property

protected Pool,Sonata\Component\Product $productPool
return Sonata\Component\Product\Pool