/**
  * @param ParameterBag $params
  *
  * @return object
  */
 public function create($params)
 {
     $entity = new FamilyStatus();
     $entity->setName($params->get('name'));
     $entity->setGeneral($params->get('general'));
     $this->persist($entity);
 }
 /**
  * Load data fixtures with the passed EntityManager
  *
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     foreach ($this->generalStatuses as $alias => $name) {
         $entity = new FamilyStatus();
         $entity->setName($name);
         $entity->setAlias($alias);
         $entity->setGeneral(true);
         $manager->persist($entity);
         $this->addReference('status:' . $alias, $entity);
     }
     foreach ($this->extendedStatuses as $alias => $name) {
         $entity = new FamilyStatus();
         $entity->setName($name);
         $entity->setAlias($alias);
         $entity->setGeneral(false);
         $manager->persist($entity);
     }
     $manager->flush();
 }