Commit 10b4848f authored by Dries's avatar Dries
Browse files

- Patch #1643702 by katbailey: incorrect method signatures in ViewSubsriber class.

parent 8e11050f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\Core\ContentNegotiation; use Drupal\Core\ContentNegotiation;
...@@ -39,10 +39,10 @@ public function __construct(ContentNegotiation $negotiation) { ...@@ -39,10 +39,10 @@ public function __construct(ContentNegotiation $negotiation) {
* from an JSON-type response is a JSON string, so just wrap it into a * from an JSON-type response is a JSON string, so just wrap it into a
* Response object. * Response object.
* *
* @param Symfony\Component\HttpKernel\Event\GetResponseEvent $event * @param Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event
* The Event to process. * The Event to process.
*/ */
public function onView(GetResponseEvent $event) { public function onView(GetResponseForControllerResultEvent $event) {
$request = $event->getRequest(); $request = $event->getRequest();
...@@ -56,7 +56,7 @@ public function onView(GetResponseEvent $event) { ...@@ -56,7 +56,7 @@ public function onView(GetResponseEvent $event) {
} }
} }
public function onJson(GetResponseEvent $event) { public function onJson(GetResponseForControllerResultEvent $event) {
$page_callback_result = $event->getControllerResult(); $page_callback_result = $event->getControllerResult();
$response = new JsonResponse(); $response = new JsonResponse();
...@@ -65,7 +65,7 @@ public function onJson(GetResponseEvent $event) { ...@@ -65,7 +65,7 @@ public function onJson(GetResponseEvent $event) {
return $response; return $response;
} }
public function onAjax(GetResponseEvent $event) { public function onAjax(GetResponseForControllerResultEvent $event) {
$page_callback_result = $event->getControllerResult(); $page_callback_result = $event->getControllerResult();
// Construct the response content from the page callback result. // Construct the response content from the page callback result.
...@@ -79,7 +79,7 @@ public function onAjax(GetResponseEvent $event) { ...@@ -79,7 +79,7 @@ public function onAjax(GetResponseEvent $event) {
return $response; return $response;
} }
public function onIframeUpload(GetResponseEvent $event) { public function onIframeUpload(GetResponseForControllerResultEvent $event) {
$page_callback_result = $event->getControllerResult(); $page_callback_result = $event->getControllerResult();
// Construct the response content from the page callback result. // Construct the response content from the page callback result.
...@@ -106,10 +106,10 @@ public function onIframeUpload(GetResponseEvent $event) { ...@@ -106,10 +106,10 @@ public function onIframeUpload(GetResponseEvent $event) {
* an HTML-type response is a render array from a legacy page callback and * an HTML-type response is a render array from a legacy page callback and
* render it. * render it.
* *
* @param Symfony\Component\HttpKernel\Event\GetResponseEvent $event * @param Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event
* The Event to process. * The Event to process.
*/ */
public function onHtml(GetResponseEvent $event) { public function onHtml(GetResponseForControllerResultEvent $event) {
$page_callback_result = $event->getControllerResult(); $page_callback_result = $event->getControllerResult();
return new Response(drupal_render_page($page_callback_result)); return new Response(drupal_render_page($page_callback_result));
} }
......
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