Exemplo n.º 1
0
 public function load(ObjectManager $manager)
 {
     $user = new User();
     $user->setUsername('user');
     $user->setPassword('$2a$04$KO68Ijmly1ibMcAfxQfv7uCs71JdAiUvkWxpc/NwaFVgmpwHERL8W');
     $user->setLastname('Chaks');
     $user->setFirstname('Alex');
     $user->setEmail('*****@*****.**');
     $user->setEnabled(true);
     $event = new Event();
     $event->setName('Party');
     $event->setIsDistributed(false);
     $event->setStartDate(new \DateTime("2020-12-31 12:13:40"));
     $event->setToken('aa');
     $event->setSharedToken('bb');
     $userEvent = new UserEvent();
     $userEvent->setEvent($event);
     $userEvent->setUser($user);
     $manager->persist($user);
     $manager->persist($event);
     $manager->persist($userEvent);
     $manager->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function setSharedToken($sharedToken)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSharedToken', [$sharedToken]);
     return parent::setSharedToken($sharedToken);
 }