/**
  * {@inheritdoc}
  */
 public function getItems()
 {
     /* @var User $user */
     $user = $this->tokenStorage->getToken()->getUser();
     $trackingCode = $this->configEntriesManager->findOneByNameOrDie(ModeraBackendGoogleAnalyticsBundle::TRACKING_CODE_CONFIG_KEY);
     return [new CallbackConfigMerger(function (array $currentConfig) use($trackingCode, $user) {
         $currentConfig['modera_backend_google_analytics'] = array('user_id' => $user->getId(), 'tracking_code' => $trackingCode->getValue(), 'is_debug' => 'prod' != $this->env, 'prefix' => '/backend');
         return $currentConfig;
     })];
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function getHomeSection()
 {
     return $this->mgr->findOneByNameOrDie(Bundle::CONFIG_HOME_SECTION)->getValue();
 }