src/Kunstmaan/DashboardBundle/Helper/Google/Analytics/ConfigHelper.php
private function getToken($configId = false)
    {
        if (!$this->token || $configId) {
            /** @var AnalyticsConfigRepository $analyticsConfigRepository */
            $analyticsConfigRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
            if ($configId) {
                $this->token = $analyticsConfigRepository->find($configId)->getToken();
            } else {
                $this->token = $analyticsConfigRepository->findFirst()->getToken();
            }
        }

        return $this->token;
    }
private function getToken($configId = false)
    {
        if (!$this->token || $configId) {
            /** @var AnalyticsConfigRepository $analyticsConfigRepository */
            $analyticsConfigRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
            if ($configId) {
                $this->token = $analyticsConfigRepository->find($configId)->getToken();
            } else {
                $this->token = $analyticsConfigRepository->findFirst()->getToken();
            }
        }

        return $this->token;
    }
private function getToken ( $ configId = false ) { if ( ! $ this -> token || $ configId ) { /** @var AnalyticsConfigRepository $analyticsConfigRepository */ $ analyticsConfigRepository = $ this -> em -> getRepository ( 'KunstmaanDashboardBundle:AnalyticsConfig' ) ; if ( $ configId ) { $ this -> token = $ analyticsConfigRepository -> find ( $ configId ) -> getToken ( ) ; } else { $ this -> token = $ analyticsConfigRepository -> findFirst ( ) -> getToken ( ) ; } } return $ this -> token ; }
Get the token from the database

@return string $token
Get the token from the database