public function create(AreaCreateEvent $event) { $area = new AreaModel(); $area->setDispatcher($event->getDispatcher())->setName($event->getAreaName())->save(); $event->setArea($area); }
public function create(AreaCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher) { $area = new AreaModel(); $area->setDispatcher($dispatcher)->setName($event->getAreaName())->save(); $event->setArea($area); }