public function save(\BackBee\Bundle\Registry $registry)
    {
        if (false === $this->getEntityManager()->contains($registry)) {
            $this->getEntityManager()->persist($registry);
        }

        $this->getEntityManager()->flush($registry);

        return $registry;
    }
public function save(\BackBee\Bundle\Registry $registry)
    {
        if (false === $this->getEntityManager()->contains($registry)) {
            $this->getEntityManager()->persist($registry);
        }

        $this->getEntityManager()->flush($registry);

        return $registry;
    }
public function save ( \ BackBee \ Bundle \ Registry $ registry ) { if ( false === $ this -> getEntityManager ( ) -> contains ( $ registry ) ) { $ this -> getEntityManager ( ) -> persist ( $ registry ) ; } $ this -> getEntityManager ( ) -> flush ( $ registry ) ; return $ registry ; }
Saves the registry entry in DB, persist it if need.

@param \BackBee\Bundle\Registry $registry

@return \BackBee\Bundle\Registry
Saves the registry entry in DB persist it if need .