/** * 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); }
/** * 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); }