remove context from the request
This commit is contained in:
@@ -28,4 +28,14 @@ class Context
|
|||||||
{
|
{
|
||||||
const CONTEXT_FRONT_OFFICE = 'front';
|
const CONTEXT_FRONT_OFFICE = 'front';
|
||||||
const CONTEXT_BACK_OFFICE = 'admin';
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,6 @@ use Thelia\Core\Context;
|
|||||||
class Request extends BaseRequest
|
class Request extends BaseRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $context = Context::CONTEXT_FRONT_OFFICE;
|
|
||||||
|
|
||||||
public function getProductId()
|
public function getProductId()
|
||||||
{
|
{
|
||||||
return $this->get("product_id");
|
return $this->get("product_id");
|
||||||
@@ -50,15 +48,4 @@ class Request extends BaseRequest
|
|||||||
}
|
}
|
||||||
return $uri . $additionalQs;
|
return $uri . $additionalQs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setContext($context)
|
|
||||||
{
|
|
||||||
$this->context = $context;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getContext()
|
|
||||||
{
|
|
||||||
return $this->context;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user