Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     for ($i = 1; $i <= 10; $i++) {
         $society = new Society();
         $society->setName("Society {$i}");
         $society->setShortName("S-{$i}");
         $society->setDescription("Description of society {$i}");
         $manager->persist($society);
     }
     $manager->flush();
 }
Exemplo n.º 2
0
 private function createSocietyWithOwner()
 {
     $em = $this->getEntityManager();
     $society = new Society();
     $society->setName('Test Society');
     $society->setShortName('Test Society');
     $em->persist($society);
     $em->flush();
     $aclProvider = $this->client->getContainer()->get('camdram.security.acl.provider');
     $aclProvider->grantAccess($society, $this->loginUser, $this->appUser);
 }