PHP Class Sonata\PaymentBundle\Consumer\PaymentProcessOrderElementConsumer

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

Protected Properties

Свойство Type Description
$orderElementManager Sonata\CoreBundle\Model\ManagerInterface
$productPool Sonata\Component\Product\Pool

Méthodes publiques

Méthode 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 )

Méthodes protégées

Méthode 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 méthode

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

generateDiffValue() public méthode

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
Résultat integer

getProductManager() protected méthode

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

getProductProvider() protected méthode

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

process() public méthode

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

Property Details

$orderElementManager protected_oe property

protected ManagerInterface,Sonata\CoreBundle\Model $orderElementManager
Résultat Sonata\CoreBundle\Model\ManagerInterface

$productPool protected_oe property

protected Pool,Sonata\Component\Product $productPool
Résultat Sonata\Component\Product\Pool