src/Kunstmaan/DashboardBundle/Repository/AnalyticsConfigRepository.php
public function createConfig()
    {
        $em = $this->getEntityManager();

        $config = new AnalyticsConfig();
        $em->persist($config);
        $em->flush();

        $this->getEntityManager()->getRepository('KunstmaanDashboardBundle:AnalyticsOverview')->addOverviews($config);

        return $config;
    }
public function createConfig()
    {
        $em = $this->getEntityManager();

        $config = new AnalyticsConfig();
        $em->persist($config);
        $em->flush();

        $this->getEntityManager()->getRepository('KunstmaanDashboardBundle:AnalyticsOverview')->addOverviews($config);

        return $config;
    }
public function createConfig ( ) { $ em = $ this -> getEntityManager ( ) ; $ config = new AnalyticsConfig ( ) ; $ em -> persist ( $ config ) ; $ em -> flush ( ) ; $ this -> getEntityManager ( ) -> getRepository ( 'KunstmaanDashboardBundle:AnalyticsOverview' ) -> addOverviews ( $ config ) ; return $ config ; }
Create a new config

@return AnalyticsConfig
Create a new config