Ejemplo n.º 1
0
 public function load(ObjectManager $manager)
 {
     $role = new Role();
     $role->setName("Visit");
     $manager->persist($role);
     $visit = $manager->getReference('Zf2Acl\\Entity\\Role', 1);
     $role = new Role();
     $role->setName("Client")->setParent($visit)->setRedirect("dashboard");
     $manager->persist($role);
     $role = new Role();
     $role->setName("Functionary")->setParent($visit)->setRedirect("dashboard");
     $manager->persist($role);
     $functionary = $manager->getReference('Zf2Acl\\Entity\\Role', 3);
     $role = new Role();
     $role->setName("Administrator")->setParent($functionary)->setRedirect("dashboard");
     $manager->persist($role);
     $role = new Role();
     $role->setName("Developer")->setDeveloper(1)->setRedirect("dashboard");
     $manager->persist($role);
     $manager->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function toArray()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array());
     return parent::toArray();
 }