Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $crew1 = new Crew();
     $crew2 = new Crew();
     $crew1->setTitle("The Clou");
     $crew2->setTitle("Against All Authority");
     $user = new User();
     $user->setRoles(array('ROLE_ADMIN'));
     $this->container->get('bound.crew_manager')->add($crew1, $user);
     $this->container->get('bound.crew_manager')->add($crew2, $user);
 }
Ejemplo n.º 2
0
 public function alreadyExists(Crew $crew)
 {
     $entity = $this->manager->getRepository('BoundCoreBundle:Crew')->findOneBy(array('slug' => $crew->getSlug()));
     return $entity != NULL;
 }