public function getGroup()
 {
     if ($this->groups[0] != null) {
         return $this->groups[0];
     }
     $group = new Group('Member', array('ROLE_MEMBER'));
     $group->setCssClass('group-member');
     return $group;
 }
 public function load(ObjectManager $manager)
 {
     $groupAdmin = new Group();
     $groupAdmin->setName("Admin");
     $groupAdmin->setRoleName("ROLE_ADMIN");
     $groupAdmin->setDescription("The admin group");
     $manager->persist($groupAdmin);
     $group = new Group();
     $group->setName("Member");
     $group->setRoleName("ROLE_MEMBER");
     $group->setDescription("The member group");
     $group->setDefault(true);
     $manager->persist($group);
     $manager->flush();
     $this->addReference('group-admin', $groupAdmin);
 }