public function create(ContentCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher) { $content = (new ContentModel())->setDispatcher($dispatcher)->setVisible($event->getVisible())->setLocale($event->getLocale())->setTitle($event->getTitle())->create($event->getDefaultFolder()); $event->setContent($content); }
public function create(ContentCreateEvent $event) { $content = new ContentModel(); $content->setVisible($event->getVisible())->setLocale($event->getLocale())->setTitle($event->getTitle())->create($event->getDefaultFolder()); $event->setContent($content); }