remove context from the request

This commit is contained in:
Manuel Raynaud
2013-08-12 12:51:21 +02:00
parent 298c13ce1f
commit b505d785ca
2 changed files with 10 additions and 13 deletions

View File

@@ -28,4 +28,14 @@ class Context
{
const CONTEXT_FRONT_OFFICE = 'front';
const CONTEXT_BACK_OFFICE = 'admin';
protected $defineContext = array(
self::CONTEXT_BACK_OFFICE,
self::CONTEXT_FRONT_OFFICE
);
public function isValidContext($context)
{
return in_array($context, $this->defineContext);
}
}

View File

@@ -28,8 +28,6 @@ use Thelia\Core\Context;
class Request extends BaseRequest
{
protected $context = Context::CONTEXT_FRONT_OFFICE;
public function getProductId()
{
return $this->get("product_id");
@@ -50,15 +48,4 @@ class Request extends BaseRequest
}
return $uri . $additionalQs;
}
public function setContext($context)
{
$this->context = $context;
}
public function getContext()
{
return $this->context;
}
}