Exemplo n.º 1
0
 /**
  * Create a new attribute entry
  *
  * @param AttributeAvCreateEvent $event
  */
 public function create(AttributeAvCreateEvent $event)
 {
     $attribute = new AttributeAvModel();
     $attribute->setDispatcher($event->getDispatcher())->setAttributeId($event->getAttributeId())->setLocale($event->getLocale())->setTitle($event->getTitle())->save();
     $event->setAttributeAv($attribute);
 }
Exemplo n.º 2
0
 /**
  * Create a new attribute entry
  *
  * @param AttributeAvCreateEvent $event
  * @param $eventName
  * @param EventDispatcherInterface $dispatcher
  */
 public function create(AttributeAvCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
 {
     $attribute = new AttributeAvModel();
     $attribute->setDispatcher($dispatcher)->setAttributeId($event->getAttributeId())->setLocale($event->getLocale())->setTitle($event->getTitle())->save();
     $event->setAttributeAv($attribute);
 }