public function load(ObjectManager $manager) { $visit = $manager->getReference('Zf2Acl\\Entity\\Role', 1); $client = $manager->getReference('Zf2Acl\\Entity\\Role', 2); $functionary = $manager->getReference('Zf2Acl\\Entity\\Role', 3); $admin = $manager->getReference('Zf2Acl\\Entity\\Role', 4); $developer = $manager->getReference('Zf2Acl\\Entity\\Role', 5); $user = new User(); $user->setEmail("*****@*****.**")->setUsername("developer")->setPassword(123456)->setPasswordClue('123456')->setStatus(true)->setRole($developer); $manager->persist($user); $user = new User(); $user->setEmail("*****@*****.**")->setUsername("admin")->setPassword(123456)->setPasswordClue('123456')->setStatus(true)->setRole($admin); $manager->persist($user); $user = new User(); $user->setEmail("*****@*****.**")->setUsername("functionary")->setPassword(123456)->setPasswordClue('123456')->setStatus(true)->setRole($functionary); $manager->persist($user); $manager->flush(); }
/** * {@inheritDoc} */ public function toArray() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array()); return parent::toArray(); }