public function load(ObjectManager $manager)
 {
     $group = $this->getReference('public-group-fields');
     $field1 = new GroupField();
     $field1->setFieldName('field1');
     $field1->setGroup($group);
     $manager->persist($field1);
     $field2 = new GroupField();
     $field2->setFieldName('field2');
     $field2->setGroup($group);
     $manager->persist($field2);
     $group->addField($field1);
     $group->addField($field2);
     $group->updateFillFieldsRequired();
     $manager->persist($group);
     $manager->flush();
     $this->addReference('public-group-field-field1', $field1);
     $this->addReference('public-group-field-field2', $field2);
 }
 public function setGroup(\Civix\CoreBundle\Entity\Group $group = NULL)
 {
     $this->__load();
     return parent::setGroup($group);
 }