From bb2676a7193bc546f43ceffcc8ee54abe9d6f3f1 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 12 Aug 2013 14:58:28 +0200 Subject: [PATCH] retrieve context value in BaseAction --- core/lib/Thelia/Action/BaseAction.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Action/BaseAction.php b/core/lib/Thelia/Action/BaseAction.php index f351b59bb..a66ed8301 100644 --- a/core/lib/Thelia/Action/BaseAction.php +++ b/core/lib/Thelia/Action/BaseAction.php @@ -53,7 +53,7 @@ class BaseAction * @param BaseForm $aBaseForm the form * @param string $expectedMethod the expected method, POST or GET, or null for any of them * @throws FormValidationException is the form contains error, or the method is not the right one - * @return Symfony\Component\Form\Form Form the symfony form object + * @return \Symfony\Component\Form\Form Form the symfony form object */ protected function validateForm(BaseForm $aBaseForm, $expectedMethod = null) { @@ -152,9 +152,15 @@ class BaseAction return $securityContext; } + /** + * + * return the environnement context contain in \Thelia\Core\Context class + * + * @return string + */ protected function getContext() { - return $this->container->get("thelia.envContext"); + return $this->container->get("thelia.envContext")->getContext(); } protected function redirect($url, $status = 302)