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