src/Kunstmaan/AdminBundle/EventListener/AdminLocaleListener.php 1 location
|
@@ 67-69 (lines=3) @@
|
64 |
|
*/ |
65 |
|
public function onKernelRequest($event) |
66 |
|
{ |
67 |
|
if (!$event instanceof GetResponseEvent && !$event instanceof ResponseEvent) { |
68 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ResponseEvent::class) ? ResponseEvent::class : GetResponseEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
69 |
|
} |
70 |
|
|
71 |
|
$url = $event->getRequest()->getRequestUri(); |
72 |
|
$token = $this->tokenStorage->getToken(); |
src/Kunstmaan/AdminBundle/EventListener/ExceptionSubscriber.php 1 location
|
@@ 52-54 (lines=3) @@
|
49 |
|
*/ |
50 |
|
public function onKernelException($event) |
51 |
|
{ |
52 |
|
if (!$event instanceof GetResponseForExceptionEvent && !$event instanceof ExceptionEvent) { |
53 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ExceptionEvent::class) ? ExceptionEvent::class : GetResponseForExceptionEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
54 |
|
} |
55 |
|
|
56 |
|
$request = $event->getRequest(); |
57 |
|
$exception = \method_exists($event, 'getThrowable') ? $event->getThrowable() : $event->getException(); |
src/Kunstmaan/AdminBundle/EventListener/PasswordCheckListener.php 1 location
|
@@ 74-76 (lines=3) @@
|
71 |
|
**/ |
72 |
|
public function onKernelRequest($event) |
73 |
|
{ |
74 |
|
if (!$event instanceof GetResponseEvent && !$event instanceof ResponseEvent) { |
75 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ResponseEvent::class) ? ResponseEvent::class : GetResponseEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
76 |
|
} |
77 |
|
|
78 |
|
$url = $event->getRequest()->getRequestUri(); |
79 |
|
if ($this->tokenStorage->getToken() && $this->adminRouteHelper->isAdminRoute($url)) { |
src/Kunstmaan/AdminBundle/EventListener/SessionSecurityListener.php 2 locations
|
@@ 57-59 (lines=3) @@
|
54 |
|
*/ |
55 |
|
public function onKernelResponse($event) |
56 |
|
{ |
57 |
|
if (!$event instanceof FilterResponseEvent && !$event instanceof ResponseEvent) { |
58 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ResponseEvent::class) ? ResponseEvent::class : FilterResponseEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
59 |
|
} |
60 |
|
|
61 |
|
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
62 |
|
return; |
|
@@ 83-85 (lines=3) @@
|
80 |
|
*/ |
81 |
|
public function onKernelRequest(GetResponseEvent $event) |
82 |
|
{ |
83 |
|
if (!$event instanceof GetResponseEvent && !$event instanceof ResponseEvent) { |
84 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ResponseEvent::class) ? ResponseEvent::class : GetResponseEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
85 |
|
} |
86 |
|
|
87 |
|
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
88 |
|
return; |
src/Kunstmaan/AdminBundle/EventListener/ToolbarListener.php 1 location
|
@@ 138-140 (lines=3) @@
|
135 |
|
*/ |
136 |
|
public function onKernelResponse($event) |
137 |
|
{ |
138 |
|
if (!$event instanceof FilterResponseEvent && !$event instanceof ResponseEvent) { |
139 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ResponseEvent::class) ? ResponseEvent::class : FilterResponseEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
140 |
|
} |
141 |
|
|
142 |
|
if (!$this->isEnabled() || HttpKernel::MASTER_REQUEST !== $event->getRequestType()) { |
143 |
|
return; |
src/Kunstmaan/MultiDomainBundle/EventListener/HostOverrideListener.php 1 location
|
@@ 60-62 (lines=3) @@
|
57 |
|
*/ |
58 |
|
public function onKernelResponse($event) |
59 |
|
{ |
60 |
|
if (!$event instanceof FilterResponseEvent && !$event instanceof ResponseEvent) { |
61 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ResponseEvent::class) ? ResponseEvent::class : FilterResponseEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
62 |
|
} |
63 |
|
|
64 |
|
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
65 |
|
return; |
src/Kunstmaan/NodeBundle/EventListener/RenderContextListener.php 1 location
|
@@ 49-51 (lines=3) @@
|
46 |
|
*/ |
47 |
|
public function onKernelView($event) |
48 |
|
{ |
49 |
|
if (!$event instanceof GetResponseForControllerResultEvent && !$event instanceof ViewEvent) { |
50 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(RequestEvent::class) ? ViewEvent::class : GetResponseForControllerResultEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
51 |
|
} |
52 |
|
|
53 |
|
$response = $event->getControllerResult(); |
54 |
|
if ($response instanceof Response) { |
src/Kunstmaan/NodeBundle/EventListener/SlugListener.php 1 location
|
@@ 53-55 (lines=3) @@
|
50 |
|
*/ |
51 |
|
public function onKernelController($event) |
52 |
|
{ |
53 |
|
if (!$event instanceof FilterControllerEvent && !$event instanceof ControllerEvent) { |
54 |
|
throw new \InvalidArgumentException(\sprintf('Expected instance of type %s, %s given', \class_exists(ControllerEvent::class) ? ControllerEvent::class : FilterControllerEvent::class, \is_object($event) ? \get_class($event) : \gettype($event))); |
55 |
|
} |
56 |
|
|
57 |
|
$request = $event->getRequest(); |
58 |
|
|