retrieve context value in BaseAction
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user