diff --git a/src/Kunstmaan/AdminBundle/Controller/DefaultController.php b/src/Kunstmaan/AdminBundle/Controller/DefaultController.php index 1d2462e598..9c59b7b614 100644 --- a/src/Kunstmaan/AdminBundle/Controller/DefaultController.php +++ b/src/Kunstmaan/AdminBundle/Controller/DefaultController.php @@ -27,7 +27,7 @@ class DefaultController extends Controller public function indexAction() { if ($this->container->hasParameter("kunstmaan_admin.dashboard_route")) { - return $this->redirect($this->generateUrl($this->container->getParameter("kunstmaan_admin.dashboard_route"))); + return $this->redirect($this->generateUrl($this->getParameter("kunstmaan_admin.dashboard_route"))); } /* @var DashboardConfiguration $dashboardConfiguration */ diff --git a/src/Kunstmaan/DashboardBundle/Controller/GoogleAnalyticsController.php b/src/Kunstmaan/DashboardBundle/Controller/GoogleAnalyticsController.php index 7ff78a96ae..30f3af4bad 100644 --- a/src/Kunstmaan/DashboardBundle/Controller/GoogleAnalyticsController.php +++ b/src/Kunstmaan/DashboardBundle/Controller/GoogleAnalyticsController.php @@ -28,7 +28,7 @@ public function widgetAction(Request $request) // if token not set if (!$configHelper->tokenIsSet()) { - if ($this->container->getParameter('google.api.client_id') != '' && $this->container->getParameter('google.api.client_secret') != '' && $this->container->getParameter('google.api.dev_key') != '' ) { + if ($this->getParameter('google.api.client_id') != '' && $this->getParameter('google.api.client_secret') != '' && $this->getParameter('google.api.dev_key') != '' ) { $params['authUrl'] = $configHelper->getAuthUrl($params['redirect_uri']); } diff --git a/src/Kunstmaan/LanguageChooserBundle/Controller/LanguageChooserController.php b/src/Kunstmaan/LanguageChooserBundle/Controller/LanguageChooserController.php index ffb827dc8d..1b6c92b4b0 100644 --- a/src/Kunstmaan/LanguageChooserBundle/Controller/LanguageChooserController.php +++ b/src/Kunstmaan/LanguageChooserBundle/Controller/LanguageChooserController.php @@ -17,10 +17,10 @@ class LanguageChooserController extends Controller */ public function indexAction(Request $request) { - $enableAutodetect = $this->container->getParameter('kunstmaan_language_chooser.autodetectlanguage'); - $enableSplashpage = $this->container->getParameter('kunstmaan_language_chooser.showlanguagechooser'); + $enableAutodetect = $this->getParameter('kunstmaan_language_chooser.autodetectlanguage'); + $enableSplashpage = $this->getParameter('kunstmaan_language_chooser.showlanguagechooser'); - $defaultLocale = $this->container->getParameter('defaultlocale'); + $defaultLocale = $this->getParameter('defaultlocale'); if ($enableAutodetect) { $localeGuesserManager = $this->get('lunetics_locale.guesser_manager'); @@ -44,7 +44,7 @@ public function indexAction(Request $request) } if ($enableSplashpage) { - $viewPath = $this->container->getParameter('kunstmaan_language_chooser.languagechoosertemplate'); + $viewPath = $this->getParameter('kunstmaan_language_chooser.languagechoosertemplate'); return $this->render($viewPath); } diff --git a/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php b/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php index 2bfba2a12a..47e013b897 100644 --- a/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php +++ b/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php @@ -914,7 +914,7 @@ public function editAction(Request $request, $id, $subaction) //Check the version timeout and make a new nodeversion if the timeout is passed $thresholdDate = date( "Y-m-d H:i:s", - time() - $this->container->getParameter( + time() - $this->getParameter( "kunstmaan_node.version_timeout" ) ); diff --git a/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php b/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php index 2a8946949f..e5b9768284 100644 --- a/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php +++ b/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php @@ -81,7 +81,7 @@ private function getTemplateParameters(Request $request) } // When the media bundle is available, we show a link in the header to the media chooser - $allBundles = $this->container->getParameter('kernel.bundles'); + $allBundles = $this->getParameter('kernel.bundles'); $mediaChooserLink = null; if (array_key_exists('KunstmaanMediaBundle', $allBundles)) { diff --git a/src/Kunstmaan/SeoBundle/Controller/Admin/SettingsController.php b/src/Kunstmaan/SeoBundle/Controller/Admin/SettingsController.php index dbd4b09170..59ac0676c4 100644 --- a/src/Kunstmaan/SeoBundle/Controller/Admin/SettingsController.php +++ b/src/Kunstmaan/SeoBundle/Controller/Admin/SettingsController.php @@ -30,7 +30,7 @@ public function robotsSettingsAction(Request $request) $em = $this->getDoctrine()->getManager(); $repo = $this->getDoctrine()->getRepository("KunstmaanSeoBundle:Robots"); $robot = $repo->findOneBy(array()); - $default = $this->container->getParameter('robots_default'); + $default = $this->getParameter('robots_default'); $isSaved = true; if (!$robot) { diff --git a/src/Kunstmaan/SeoBundle/Controller/RobotsController.php b/src/Kunstmaan/SeoBundle/Controller/RobotsController.php index eae2fe7d10..5c8bdb643b 100644 --- a/src/Kunstmaan/SeoBundle/Controller/RobotsController.php +++ b/src/Kunstmaan/SeoBundle/Controller/RobotsController.php @@ -21,7 +21,7 @@ class RobotsController extends Controller public function indexAction(Request $request) { $entity = $this->getDoctrine()->getRepository('KunstmaanSeoBundle:Robots')->findOneBy(array()); - $robots = $this->container->getParameter('robots_default'); + $robots = $this->getParameter('robots_default'); if ($entity && $entity->getRobotsTxt()) { $robots = $entity->getRobotsTxt(); diff --git a/src/Kunstmaan/TranslatorBundle/Controller/TranslatorCommandController.php b/src/Kunstmaan/TranslatorBundle/Controller/TranslatorCommandController.php index 59de263fa0..690f748f3b 100644 --- a/src/Kunstmaan/TranslatorBundle/Controller/TranslatorCommandController.php +++ b/src/Kunstmaan/TranslatorBundle/Controller/TranslatorCommandController.php @@ -30,8 +30,8 @@ public function importAction() $importCommand = new ImportCommand(); $importCommand ->setForce(false) - ->setDefaultBundle($this->container->getParameter('kuma_translator.default_bundle')) - ->setBundles($this->container->getParameter('kuma_translator.bundles')) + ->setDefaultBundle($this->getParameter('kuma_translator.default_bundle')) + ->setBundles($this->getParameter('kuma_translator.bundles')) ->setGlobals(true); $this->get('kunstmaan_translator.service.importer.command_handler')->executeImportCommand($importCommand); @@ -49,8 +49,8 @@ public function importForcedAction() $importCommand = new ImportCommand(); $importCommand ->setForce(true) - ->setDefaultBundle($this->container->getParameter('kuma_translator.default_bundle')) - ->setBundles($this->container->getParameter('kuma_translator.bundles')) + ->setDefaultBundle($this->getParameter('kuma_translator.default_bundle')) + ->setBundles($this->getParameter('kuma_translator.bundles')) ->setGlobals(false); $this->get('kunstmaan_translator.service.importer.command_handler')->executeImportCommand($importCommand); diff --git a/src/Kunstmaan/TranslatorBundle/Controller/TranslatorController.php b/src/Kunstmaan/TranslatorBundle/Controller/TranslatorController.php index f74dd6ab1a..e8f2050ebf 100644 --- a/src/Kunstmaan/TranslatorBundle/Controller/TranslatorController.php +++ b/src/Kunstmaan/TranslatorBundle/Controller/TranslatorController.php @@ -48,7 +48,7 @@ public function indexAction(Request $request) $adminList->bindRequest($request); $cacheFresh = $this->get('kunstmaan_translator.service.translator.cache_validator')->isCacheFresh(); - $debugMode = $this->container->getParameter('kuma_translator.debug') === true; + $debugMode = $this->getParameter('kuma_translator.debug') === true; if (!$cacheFresh && !$debugMode) { $noticeText = $this->get('translator')->trans('settings.translator.not_live_warning'); @@ -82,7 +82,7 @@ public function addAction(Request $request, $keyword = '', $domain = '', $locale $translator = $this->get('translator'); $translation = new \Kunstmaan\TranslatorBundle\Model\Translation(); - $locales = $this->container->getParameter('kuma_translator.managed_locales'); + $locales = $this->getParameter('kuma_translator.managed_locales'); foreach ($locales as $locale) { $translation->addText($locale, ''); } @@ -150,7 +150,7 @@ public function editAction(Request $request, $id) $translation = new \Kunstmaan\TranslatorBundle\Model\Translation(); $translation->setDomain($translations[0]->getDomain()); $translation->setKeyword($translations[0]->getKeyword()); - $locales = $this->container->getParameter('kuma_translator.managed_locales'); + $locales = $this->getParameter('kuma_translator.managed_locales'); foreach ($locales as $locale) { $found = false; foreach ($translations as $t) { @@ -250,7 +250,7 @@ public function setAdminListConfigurator($adminListConfigurator) */ public function getAdminListConfigurator() { - $locales = explode('|', $this->container->getParameter('requiredlocales')); + $locales = explode('|', $this->getParameter('requiredlocales')); if (!isset($this->adminListConfigurator)) { $this->adminListConfigurator = new TranslationAdminListConfigurator($this->getDoctrine()->getManager() diff --git a/src/Kunstmaan/UserManagementBundle/Controller/UsersController.php b/src/Kunstmaan/UserManagementBundle/Controller/UsersController.php index b68c8f246b..3c465977a0 100644 --- a/src/Kunstmaan/UserManagementBundle/Controller/UsersController.php +++ b/src/Kunstmaan/UserManagementBundle/Controller/UsersController.php @@ -44,7 +44,7 @@ public function listAction(Request $request) $userObject = $this->getUserClassInstance(); $configuratorClassName = ''; if ($this->container->hasParameter('kunstmaan_user_management.user_admin_list_configurator.class')) { - $configuratorClassName = $this->container->getParameter( + $configuratorClassName = $this->getParameter( 'kunstmaan_user_management.user_admin_list_configurator.class' ); } @@ -71,7 +71,7 @@ public function listAction(Request $request) */ private function getUserClassInstance() { - $userClassName = $this->container->getParameter('fos_user.model.user.class'); + $userClassName = $this->getParameter('fos_user.model.user.class'); return new $userClassName(); } @@ -93,7 +93,7 @@ public function addAction(Request $request) $user = $this->getUserClassInstance(); - $options = array('password_required' => true, 'langs' => $this->container->getParameter('kunstmaan_admin.admin_locales'), 'validation_groups' => array('Registration'), 'data_class' => get_class($user)); + $options = array('password_required' => true, 'langs' => $this->getParameter('kunstmaan_admin.admin_locales'), 'validation_groups' => array('Registration'), 'data_class' => get_class($user)); $formTypeClassName = $user->getFormTypeClass(); $formType = new $formTypeClassName(); @@ -156,7 +156,7 @@ public function editAction(Request $request, $id) $em = $this->getDoctrine()->getManager(); /** @var UserInterface $user */ - $user = $em->getRepository($this->container->getParameter('fos_user.model.user.class'))->find($id); + $user = $em->getRepository($this->getParameter('fos_user.model.user.class'))->find($id); if ($user === null) { throw new NotFoundHttpException(sprintf('User with ID %s not found', $id)); } @@ -164,7 +164,7 @@ public function editAction(Request $request, $id) $userEvent = new UserEvent($user, $request); $this->container->get('event_dispatcher')->dispatch(UserEvents::USER_EDIT_INITIALIZE, $userEvent); - $options = array('password_required' => false, 'langs' => $this->container->getParameter('kunstmaan_admin.admin_locales'), 'data_class' => get_class($user)); + $options = array('password_required' => false, 'langs' => $this->getParameter('kunstmaan_admin.admin_locales'), 'data_class' => get_class($user)); $formFqn = $user->getFormTypeClass(); $formType = new $formFqn(); @@ -238,7 +238,7 @@ public function deleteAction(Request $request, $id) /* @var $em EntityManager */ $em = $this->getDoctrine()->getManager(); /* @var UserInterface $user */ - $user = $em->getRepository($this->container->getParameter('fos_user.model.user.class'))->find($id); + $user = $em->getRepository($this->getParameter('fos_user.model.user.class'))->find($id); if (!is_null($user)) { $userEvent = new UserEvent($user, $request); $this->container->get('event_dispatcher')->dispatch(UserEvents::USER_DELETE_INITIALIZE, $userEvent);