src/Kunstmaan/DashboardBundle/Command/GoogleAnalyticsSegmentsListCommand.php
private function getSegmentsOfConfig($configId)
    {
        // get specified config
        $configRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
        $config = $configRepository->find($configId);

        if (!$config) {
            throw new \Exception('Unkown config ID');
        }

        // get the segments
        return $config->getSegments();
    }
private function getSegmentsOfConfig($configId)
    {
        // get specified config
        $configRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
        $config = $configRepository->find($configId);

        if (!$config) {
            throw new \Exception('Unkown config ID');
        }

        // get the segments
        return $config->getSegments();
    }
private function getSegmentsOfConfig ( $ configId ) { // get specified config $ configRepository = $ this -> em -> getRepository ( 'KunstmaanDashboardBundle:AnalyticsConfig' ) ; $ config = $ configRepository -> find ( $ configId ) ; if ( ! $ config ) { throw new \ Exception ( 'Unkown config ID' ) ; } // get the segments return $ config -> getSegments ( ) ; }
get all segments of a config

@param int $configId

@return array
get all segments of a config