Send a JSON HTTP response based on the given API response
public respondFromApiResponse ( Elgg\Services\AjaxResponse $api_response, string $hook_type = '' ) : Symfony\Component\HttpFoundation\JsonResponse | ||
$api_response | Elgg\Services\AjaxResponse | API response |
$hook_type | string | The hook type. If given, the response will be filtered by hook |
return | Symfony\Component\HttpFoundation\JsonResponse |