PHP Class PartKeepr\PartBundle\Listeners\StockLevelListener

Inheritance: extends Symfony\Component\DependencyInjection\ContainerAware
Show file Open project: partkeepr/PartKeepr

Public Methods

Method Description
onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $eventArgs ) Recomputes the stock level for each part.

Protected Methods

Method Description
updateStockLevel ( Part $part, Doctrine\ORM\Event\OnFlushEventArgs $eventArgs ) Updates the stock level for a specific part.

Method Details

onFlush() public method

Recomputes the stock level for each part.
public onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $eventArgs )
$eventArgs Doctrine\ORM\Event\OnFlushEventArgs The event arguments as given by Doctrine

updateStockLevel() protected method

Updates the stock level for a specific part.
protected updateStockLevel ( Part $part, Doctrine\ORM\Event\OnFlushEventArgs $eventArgs )
$part PartKeepr\PartBundle\Entity\Part The part to update
$eventArgs Doctrine\ORM\Event\OnFlushEventArgs The event arguments