public function generateNumber(DoctrineEvent $event)
 {
     $number = $this->om->getRepository('JLMCommerceBundle:QuoteVariant')->getCount($event->getEntity()->getQuote()) + 1;
     $event->getEntity()->setVariantNumber($number);
 }
 public function createQuoteVariantCreationEvent(DoctrineEvent $event)
 {
     $event->getEntity()->getQuote()->addEvent(Quote::EVENT_CREATION, array('variant' => $event->getEntity()->getNumber()));
 }