retrieve context value in BaseAction

This commit is contained in:
Manuel Raynaud
2013-08-12 14:58:28 +02:00
parent b4c4898374
commit bb2676a719

View File

@@ -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)