public function ListenerPageController::jsonResponse in Evercurrent 8
Same name and namespace in other branches
- 8.2 src/Controller/ListenerPageController.php \Drupal\evercurrent\Controller\ListenerPageController::jsonResponse()
1 call to ListenerPageController::jsonResponse()
- ListenerPageController::content in src/
Controller/ ListenerPageController.php
File
- src/
Controller/ ListenerPageController.php, line 54 - Contains \Drupal\example\Controller\ExamleController.
Class
- ListenerPageController
- Creates a callback for listening to the server.
Namespace
Drupal\evercurrent\ControllerCode
public function jsonResponse($message, $type) {
return new JsonResponse([
'data' => [
'message' => $message,
'type' => $type,
],
]);
}