Commit 618ad0e8 authored by Tino Goratsch's avatar Tino Goratsch

prepared the removal of the AdminContext

parent 90e69bc7
......@@ -14,21 +14,6 @@ use ACP3\Core;
*/
abstract class AbstractAdminAction extends Core\Controller\AbstractFrontendAction
{
/**
* @var \ACP3\Core\Session\SessionHandlerInterface
*/
protected $session;
/**
* @param \ACP3\Core\Controller\Context\AdminContext $context
*/
public function __construct(Context\AdminContext $context)
{
parent::__construct($context);
$this->session = $context->getSession();
}
/**
* @return $this
* @throws \ACP3\Core\Authentication\Exception\UnauthorizedAccessException
......
......@@ -13,38 +13,4 @@ use ACP3\Core;
*/
class AdminContext extends FrontendContext
{
/**
* @var \ACP3\Core\Session\SessionHandlerInterface
*/
protected $session;
/**
* AdminContext constructor.
*
* @param \ACP3\Core\Controller\Context\FrontendContext $context
* @param \ACP3\Core\Session\SessionHandlerInterface $session
*/
public function __construct(
Core\Controller\Context\FrontendContext $context,
Core\Session\SessionHandlerInterface $session
) {
parent::__construct(
$context,
$context->getAssets(),
$context->getBreadcrumb(),
$context->getTitle(),
$context->getActionHelper(),
$context->getResponse()
);
$this->session = $session;
}
/**
* @return \ACP3\Core\Session\SessionHandlerInterface
*/
public function getSession()
{
return $this->session;
}
}
......@@ -20,9 +20,7 @@ services:
core.context.admin:
class: ACP3\Core\Controller\Context\AdminContext
arguments:
- '@core.context.frontend'
- '@core.session'
parent: core.context.frontend
public: false
core.context.frontend:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment