@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | if (empty($locale) && in_array('cookie', $pgstrat)) { |
| 91 | 91 | $serviceManager->get('router')->setTranslator($translator); |
| 92 | 92 | if ($serviceManager->get('router')->match($serviceManager->get('request')) && |
| 93 | - strpos($serviceManager->get('router')->match($serviceManager->get('request'))->getMatchedRouteName(), 'admin') !==false |
|
| 93 | + strpos($serviceManager->get('router')->match($serviceManager->get('request'))->getMatchedRouteName(), 'admin') !== false |
|
| 94 | 94 | ) { |
| 95 | 95 | if ($e->getRequest()->getCookie() && |
| 96 | 96 | $e->getRequest()->getCookie()->offsetExists('pg_locale_back') |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | // Google Analytics : When the render event is triggered, we invoke the view helper to |
| 193 | 193 | // render the javascript code. |
| 194 | - $e->getApplication()->getEventManager()->attach(\Zend\Mvc\MvcEvent::EVENT_RENDER, function (\Zend\Mvc\MvcEvent $e) use ($serviceManager) { |
|
| 194 | + $e->getApplication()->getEventManager()->attach(\Zend\Mvc\MvcEvent::EVENT_RENDER, function(\Zend\Mvc\MvcEvent $e) use ($serviceManager) { |
|
| 195 | 195 | $view = $serviceManager->get('ViewHelperManager'); |
| 196 | 196 | $plugin = $view->get('googleAnalytics'); |
| 197 | 197 | $plugin(); |
@@ -218,8 +218,8 @@ discard block |
||
| 218 | 218 | // that they need to send the user back to FB... |
| 219 | 219 | |
| 220 | 220 | if (!count($_COOKIE) > 0 && strpos($_SERVER['HTTP_USER_AGENT'], 'Safari')) { |
| 221 | - echo '<script type="text/javascript">' . |
|
| 222 | - 'window.top.location.href = window.location.href+"?redir_fb_page_id='. $data["page"]["id"]. '";' . |
|
| 221 | + echo '<script type="text/javascript">'. |
|
| 222 | + 'window.top.location.href = window.location.href+"?redir_fb_page_id='.$data["page"]["id"].'";'. |
|
| 223 | 223 | '</script>'; |
| 224 | 224 | } |
| 225 | 225 | |
@@ -234,21 +234,21 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | public function getConfig() |
| 236 | 236 | { |
| 237 | - return include __DIR__ . '/../config/module.config.php'; |
|
| 237 | + return include __DIR__.'/../config/module.config.php'; |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | public function getViewHelperConfig() |
| 241 | 241 | { |
| 242 | 242 | return array( |
| 243 | 243 | 'factories' => array( |
| 244 | - 'QgCKEditor' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 244 | + 'QgCKEditor' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 245 | 245 | $config = $sm->getServiceLocator()->get('config'); |
| 246 | 246 | $QuCk = new View\Helper\AdCKEditor($config['playgroundcore']['ckeditor']); |
| 247 | 247 | |
| 248 | 248 | return $QuCk; |
| 249 | 249 | }, |
| 250 | 250 | |
| 251 | - 'googleAnalytics' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 251 | + 'googleAnalytics' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 252 | 252 | $tracker = $sm->getServiceLocator()->get('google-analytics'); |
| 253 | 253 | |
| 254 | 254 | $helper = new View\Helper\GoogleAnalytics($tracker, $sm->getServiceLocator()->get('Request')); |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | return $helper; |
| 257 | 257 | }, |
| 258 | 258 | |
| 259 | - 'facebookOpengraph' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 259 | + 'facebookOpengraph' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 260 | 260 | $tracker = $sm->getServiceLocator()->get('facebook-opengraph'); |
| 261 | 261 | |
| 262 | 262 | $helper = new View\Helper\FacebookOpengraph($tracker, $sm->getServiceLocator()->get('Request')); |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | return $helper; |
| 265 | 265 | }, |
| 266 | 266 | |
| 267 | - 'twitterCard' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 267 | + 'twitterCard' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 268 | 268 | $viewHelper = new View\Helper\TwitterCard(); |
| 269 | 269 | $viewHelper->setConfig($sm->getServiceLocator()->get('twitter-card')); |
| 270 | 270 | $viewHelper->setRequest($sm->getServiceLocator()->get('Request')); |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | return $viewHelper; |
| 273 | 273 | }, |
| 274 | 274 | |
| 275 | - 'switchLocaleWidget' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 275 | + 'switchLocaleWidget' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 276 | 276 | $viewHelper = new View\Helper\SwitchLocaleWidget(); |
| 277 | 277 | $viewHelper->setLocaleService($sm->getServiceLocator()->get('playgroundcore_locale_service')); |
| 278 | 278 | $viewHelper->setWebsiteService($sm->getServiceLocator()->get('playgroundcore_website_service')); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | return $viewHelper; |
| 282 | 282 | }, |
| 283 | 283 | |
| 284 | - 'countryName' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 284 | + 'countryName' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 285 | 285 | $service = $sm->getServiceLocator()->get('playgroundcore_country_service'); |
| 286 | 286 | $viewHelper = new View\Helper\CountryName($service); |
| 287 | 287 | |
@@ -302,13 +302,13 @@ discard block |
||
| 302 | 302 | ), |
| 303 | 303 | |
| 304 | 304 | 'factories' => array( |
| 305 | - 'playgroundcore_module_options' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 305 | + 'playgroundcore_module_options' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 306 | 306 | $config = $sm->get('Configuration'); |
| 307 | 307 | |
| 308 | 308 | return new Options\ModuleOptions(isset($config['playgroundcore']) ? $config['playgroundcore'] : array()); |
| 309 | 309 | }, |
| 310 | 310 | |
| 311 | - 'playgroundcore_formgen_mapper' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 311 | + 'playgroundcore_formgen_mapper' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 312 | 312 | return new Mapper\Formgen( |
| 313 | 313 | $sm->get('playgroundcore_doctrine_em'), |
| 314 | 314 | $sm->get('playgroundcore_module_options'), |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | ); |
| 317 | 317 | }, |
| 318 | 318 | |
| 319 | - 'playgroundcore_website_mapper' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 319 | + 'playgroundcore_website_mapper' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 320 | 320 | |
| 321 | 321 | return new Mapper\Website( |
| 322 | 322 | $sm->get('playgroundcore_doctrine_em'), |
@@ -325,14 +325,14 @@ discard block |
||
| 325 | 325 | ); |
| 326 | 326 | }, |
| 327 | 327 | |
| 328 | - 'playgroundcore_locale_mapper' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 328 | + 'playgroundcore_locale_mapper' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 329 | 329 | return new Mapper\Locale( |
| 330 | 330 | $sm->get('playgroundcore_doctrine_em'), |
| 331 | 331 | $sm->get('playgroundcore_module_options'), |
| 332 | 332 | $sm |
| 333 | 333 | ); |
| 334 | 334 | }, |
| 335 | - 'PlaygroundCore\Analytics\Tracker' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 335 | + 'PlaygroundCore\Analytics\Tracker' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 336 | 336 | $config = $sm->get('config'); |
| 337 | 337 | $config = isset($config['playgroundcore']) ? $config['playgroundcore']['googleAnalytics'] : array('id' => 'UA-XXXXXXXX-X'); |
| 338 | 338 | |
@@ -345,8 +345,8 @@ discard block |
||
| 345 | 345 | if (isset($config['custom_vars'])) { |
| 346 | 346 | foreach ($config['custom_vars'] as $customVar) { |
| 347 | 347 | $customVarId = $customVar['id']; |
| 348 | - $customVarName = $customVar['name']; |
|
| 349 | - $customVarValue = $customVar['value']; |
|
| 348 | + $customVarName = $customVar['name']; |
|
| 349 | + $customVarValue = $customVar['value']; |
|
| 350 | 350 | $customVarOptScope = $customVar['optScope']; |
| 351 | 351 | $customVar = new Analytics\CustomVar($customVarId, $customVarName, $customVarValue, $customVarOptScope); |
| 352 | 352 | $tracker->addCustomVar($customVar); |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | |
| 368 | 368 | return $tracker; |
| 369 | 369 | }, |
| 370 | - 'PlaygroundCore\Opengraph\Tracker' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 370 | + 'PlaygroundCore\Opengraph\Tracker' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 371 | 371 | $config = $sm->get('config'); |
| 372 | 372 | $config = isset($config['playgroundcore']['facebookOpengraph']) ? $config['playgroundcore']['facebookOpengraph'] : array('appId' => ''); |
| 373 | 373 | |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | |
| 387 | 387 | return $tracker; |
| 388 | 388 | }, |
| 389 | - 'PlaygroundCore\TwitterCard\Config' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 389 | + 'PlaygroundCore\TwitterCard\Config' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 390 | 390 | $config = $sm->get('config'); |
| 391 | 391 | $config = isset($config['playgroundcore']['twitterCard']) ? $config['playgroundcore']['twitterCard'] : array(); |
| 392 | 392 | return new TwitterCard\Config($config); |