Skip to content

Instantly share code, notes, and snippets.

@RedDevilHat
Created April 4, 2019 16:34
Show Gist options
  • Save RedDevilHat/92e26bcad3122524522215b8874992e7 to your computer and use it in GitHub Desktop.
Save RedDevilHat/92e26bcad3122524522215b8874992e7 to your computer and use it in GitHub Desktop.
public function postPersist(LifecycleEventArgs $args)
{
$offer = $args->getEntity();
if ($offer instanceof Offer) {
if (Offer::STATUS_READY_TO_QUEUE=== $offer->getStatus()) {
$this->bus->dispatch(new OfferBidMessage($offer->getId(),(string) $offer->getBid()));
}
if(Offer::STATUS_NEED_PROCESS_PACK === $offer->getStatus()) {
$this->bus->dispatch(new OfferProcessPackMessage($offer->getId()));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment