dispatcher not needed anymore in ActionFactory
This commit is contained in:
@@ -48,7 +48,7 @@ class ControllerListener implements EventSubscriberInterface
|
|||||||
$request = $event->getRequest();
|
$request = $event->getRequest();
|
||||||
if (false !== $action = $request->get("action")) {
|
if (false !== $action = $request->get("action")) {
|
||||||
//search corresponding action
|
//search corresponding action
|
||||||
$event = new ActionEventFactory($request, $action, $event->getDispatcher(), $event->getKernel()->getContainer()->getParameter("thelia.actionEvent"));
|
$event = new ActionEventFactory($request, $action, $event->getKernel()->getContainer()->getParameter("thelia.actionEvent"));
|
||||||
$dispatcher->dispatch("action.".$action, $event->createActionEvent());
|
$dispatcher->dispatch("action.".$action, $event->createActionEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ class ActionEventFactory
|
|||||||
|
|
||||||
protected $request;
|
protected $request;
|
||||||
protected $action;
|
protected $action;
|
||||||
protected $dispatcher;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo : delegate to config for creating associating value
|
* @todo : delegate to config for creating associating value
|
||||||
@@ -43,11 +42,10 @@ class ActionEventFactory
|
|||||||
|
|
||||||
protected $defaultClassName = "Thelia\Core\Event\DefaultActionEvent";
|
protected $defaultClassName = "Thelia\Core\Event\DefaultActionEvent";
|
||||||
|
|
||||||
public function __construct(Request $request, $action, EventDispatcherInterface $dispatcher, $className)
|
public function __construct(Request $request, $action, $className)
|
||||||
{
|
{
|
||||||
$this->request = $request;
|
$this->request = $request;
|
||||||
$this->action = $action;
|
$this->action = $action;
|
||||||
$this->dispatcher = $dispatcher;
|
|
||||||
$this->className = $className;
|
$this->className = $className;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user