You are here

public function SocialLanguageModalRenderer::renderResponse in Open Social 8.3

Same name and namespace in other branches
  1. 8.9 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  2. 8 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  3. 8.2 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  4. 8.4 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  5. 8.5 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  6. 8.6 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  7. 8.7 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  8. 8.8 modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  9. 10.3.x modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  10. 10.0.x modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  11. 10.1.x modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()
  12. 10.2.x modules/custom/social_language/src/SocialLanguageModalRenderer.php \Drupal\social_language\SocialLanguageModalRenderer::renderResponse()

Renders the main content render array into a response.

Parameters

array $main_content: The render array representing the main content.

\Symfony\Component\HttpFoundation\Request $request: The request object, for context.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match, for context.

Return value

\Symfony\Component\HttpFoundation\Response The Response in the format that this implementation supports.

Overrides ModalRenderer::renderResponse

File

modules/custom/social_language/src/SocialLanguageModalRenderer.php, line 20

Class

SocialLanguageModalRenderer
Social Language main content renderer for modal dialog requests.

Namespace

Drupal\social_language

Code

public function renderResponse(array $main_content, Request $request, RouteMatchInterface $route_match) {
  $sub_request = $request->request
    ->all();
  $sub_request['dialogOptions']['closeText'] = $this
    ->t('Close');
  $request = new Request($request->query
    ->all(), $sub_request, $request->attributes
    ->all(), $request->cookies
    ->all(), $request->files
    ->all(), $request->server
    ->all(), $request
    ->getContent());
  return parent::renderResponse($main_content, $request, $route_match);
}