Sonata\Component\Product\ProductManagerInterface::updateStock PHP Method

updateStock() public method

Updated stock value for a given Product.
public updateStock ( Sonata\Component\Product\ProductInterface | integer $product, integer $diff )
$product Sonata\Component\Product\ProductInterface | integer
$diff integer
    public function updateStock($product, $diff);

Usage Example

 /**
  * {@inheritdoc}
  */
 public function updateStock($product, ProductManagerInterface $productManager, $diff)
 {
     $productManager->updateStock($product, $diff);
 }