From 3ac3224e1cf222295cf98b4d1ccd2e3eff3462c2 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Fri, 6 Sep 2013 16:14:35 +0200 Subject: [PATCH] add help in BaseController for retrieving the translator (method getTranslator) --- core/lib/Thelia/Controller/BaseController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/lib/Thelia/Controller/BaseController.php b/core/lib/Thelia/Controller/BaseController.php index 853776214..04d3d7ba0 100755 --- a/core/lib/Thelia/Controller/BaseController.php +++ b/core/lib/Thelia/Controller/BaseController.php @@ -81,6 +81,17 @@ class BaseController extends ContainerAware return $this->container->get('event_dispatcher'); } + /** + * + * return the Translator + * + * @return mixed \Thelia\Core\Translation\Translator + */ + public function getTranslator() + { + return $this->getContainer()->get('thelia.translator'); + } + /** * Return the parser context, *