/** * @param NodeCreateEvent $event */ public function create(NodeCreateEvent $event) { $event->getNode()->alias = new Alias(); }
/** * @param NodeCreateEvent $event * * @throws \Exception */ public function createEntity(NodeCreateEvent $event) { $className = $this->registry->getRepository($this->lookupEntityName($event->getType()))->getClassName(); $event->setEntity(new $className()); }