Example #1
0
 public function load(ObjectManager $manager)
 {
     $admin = new User();
     $admin->setCreatedAt(new \DateTime());
     $admin->setUpdatedAt(new \DateTime());
     $admin->setUsername('admin');
     $admin->setUsernameCanonical('admin');
     $admin->setEmail('*****@*****.**');
     $admin->setEmailCanonical('*****@*****.**');
     $admin->setEnabled(1);
     $admin->setPlainPassword('admin');
     $admin->setSuperAdmin(true);
     //$admin->addRole(static::ROLE_SUPER_ADMIN);
     $manager->persist($admin);
     $manager->flush();
     $this->addReference('admin', $admin);
 }
 /**
  * {@inheritDoc}
  */
 public function setUpdatedAt(\DateTime $updatedAt = NULL)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUpdatedAt', array($updatedAt));
     return parent::setUpdatedAt($updatedAt);
 }