src/Kunstmaan/NodeBundle/EventListener/RenderContextListener.php 1 location
|
@@ 50-52 (lines=3) @@
|
47 |
|
*/ |
48 |
|
public function onKernelView($event) |
49 |
|
{ |
50 |
|
if (!$event instanceof GetResponseForControllerResultEvent && !$event instanceof ViewEvent) { |
51 |
|
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))); |
52 |
|
} |
53 |
|
|
54 |
|
$response = $event->getControllerResult(); |
55 |
|
if ($response instanceof Response) { |
src/Kunstmaan/AdminBundle/EventListener/AdminLocaleListener.php 1 location
|
@@ 64-66 (lines=3) @@
|
61 |
|
*/ |
62 |
|
public function onKernelRequest($event) |
63 |
|
{ |
64 |
|
if (!$event instanceof GetResponseEvent && !$event instanceof ResponseEvent) { |
65 |
|
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))); |
66 |
|
} |
67 |
|
|
68 |
|
$url = $event->getRequest()->getRequestUri(); |
69 |
|
if (!$this->adminRouteHelper->isAdminRoute($url)) { |
src/Kunstmaan/AdminBundle/EventListener/ExceptionSubscriber.php 1 location
|
@@ 49-51 (lines=3) @@
|
46 |
|
*/ |
47 |
|
public function onKernelException($event) |
48 |
|
{ |
49 |
|
if (!$event instanceof GetResponseForExceptionEvent && !$event instanceof ExceptionEvent) { |
50 |
|
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))); |
51 |
|
} |
52 |
|
|
53 |
|
$request = $event->getRequest(); |
54 |
|
$exception = \method_exists($event, 'getThrowable') ? $event->getThrowable() : $event->getException(); |
src/Kunstmaan/AdminBundle/EventListener/PasswordCheckListener.php 1 location
|
@@ 66-68 (lines=3) @@
|
63 |
|
**/ |
64 |
|
public function onKernelRequest($event) |
65 |
|
{ |
66 |
|
if (!$event instanceof GetResponseEvent && !$event instanceof ResponseEvent) { |
67 |
|
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))); |
68 |
|
} |
69 |
|
|
70 |
|
$url = $event->getRequest()->getRequestUri(); |
71 |
|
if (!$this->adminRouteHelper->isAdminRoute($url)) { |
src/Kunstmaan/AdminBundle/EventListener/SessionSecurityListener.php 2 locations
|
@@ 56-58 (lines=3) @@
|
53 |
|
*/ |
54 |
|
public function onKernelResponse($event) |
55 |
|
{ |
56 |
|
if (!$event instanceof FilterResponseEvent && !$event instanceof ResponseEvent) { |
57 |
|
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))); |
58 |
|
} |
59 |
|
|
60 |
|
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
61 |
|
return; |
|
@@ 79-81 (lines=3) @@
|
76 |
|
|
77 |
|
public function onKernelRequest(GetResponseEvent $event) |
78 |
|
{ |
79 |
|
if (!$event instanceof GetResponseEvent && !$event instanceof ResponseEvent) { |
80 |
|
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))); |
81 |
|
} |
82 |
|
|
83 |
|
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
84 |
|
return; |
src/Kunstmaan/AdminBundle/EventListener/ToolbarListener.php 1 location
|
@@ 130-132 (lines=3) @@
|
127 |
|
*/ |
128 |
|
public function onKernelResponse($event) |
129 |
|
{ |
130 |
|
if (!$event instanceof FilterResponseEvent && !$event instanceof ResponseEvent) { |
131 |
|
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))); |
132 |
|
} |
133 |
|
|
134 |
|
if (!$this->isEnabled() || HttpKernel::MASTER_REQUEST !== $event->getRequestType()) { |
135 |
|
return; |
src/Kunstmaan/MultiDomainBundle/EventListener/HostOverrideListener.php 1 location
|
@@ 54-56 (lines=3) @@
|
51 |
|
*/ |
52 |
|
public function onKernelResponse($event) |
53 |
|
{ |
54 |
|
if (!$event instanceof FilterResponseEvent && !$event instanceof ResponseEvent) { |
55 |
|
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))); |
56 |
|
} |
57 |
|
|
58 |
|
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
59 |
|
return; |
src/Kunstmaan/NodeBundle/EventListener/SlugListener.php 1 location
|
@@ 49-51 (lines=3) @@
|
46 |
|
*/ |
47 |
|
public function onKernelController($event) |
48 |
|
{ |
49 |
|
if (!$event instanceof FilterControllerEvent && !$event instanceof ControllerEvent) { |
50 |
|
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))); |
51 |
|
} |
52 |
|
|
53 |
|
$request = $event->getRequest(); |
54 |
|
|