src/Kunstmaan/DashboardBundle/Command/GoogleAnalyticsOverviewsGenerateCommand.php
private function generateAllOverviews()
    {
        $configRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
        $overviewRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsOverview');
        $segmentRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsSegment');
        $configs = $configRepository->findAll();

        foreach ($configs as $config) {
            // add overviews if none exist yet
            if (!count($configRepository->findDefaultOverviews($config))) {
                $overviewRepository->addOverviews($config);
            }

            // init all the segments for this config
            $segments = $config->getSegments();
            foreach ($segments as $segment) {
                $segmentRepository->initSegment($segment);
            }
        }
    }
private function generateAllOverviews()
    {
        $configRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
        $overviewRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsOverview');
        $segmentRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsSegment');
        $configs = $configRepository->findAll();

        foreach ($configs as $config) {
            // add overviews if none exist yet
            if (!count($configRepository->findDefaultOverviews($config))) {
                $overviewRepository->addOverviews($config);
            }

            // init all the segments for this config
            $segments = $config->getSegments();
            foreach ($segments as $segment) {
                $segmentRepository->initSegment($segment);
            }
        }
    }
private function generateAllOverviews ( ) { $ configRepository = $ this -> em -> getRepository ( 'KunstmaanDashboardBundle:AnalyticsConfig' ) ; $ overviewRepository = $ this -> em -> getRepository ( 'KunstmaanDashboardBundle:AnalyticsOverview' ) ; $ segmentRepository = $ this -> em -> getRepository ( 'KunstmaanDashboardBundle:AnalyticsSegment' ) ; $ configs = $ configRepository -> findAll ( ) ; foreach ( $ configs as $ config ) { // add overviews if none exist yet if ( ! count ( $ configRepository -> findDefaultOverviews ( $ config ) ) ) { $ overviewRepository -> addOverviews ( $ config ) ; } // init all the segments for this config $ segments = $ config -> getSegments ( ) ; foreach ( $ segments as $ segment ) { $ segmentRepository -> initSegment ( $ segment ) ; } } }
get all overviews

@return array
get all overviews