SocialLanguageModalRenderer.php in Open Social 8.3
Same filename and directory in other branches
- 8.9 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 8 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 8.2 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 8.4 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 8.5 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 8.6 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 8.7 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 8.8 modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 10.3.x modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 10.0.x modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 10.1.x modules/custom/social_language/src/SocialLanguageModalRenderer.php
- 10.2.x modules/custom/social_language/src/SocialLanguageModalRenderer.php
Namespace
Drupal\social_languageFile
modules/custom/social_language/src/SocialLanguageModalRenderer.phpView source
<?php
namespace Drupal\social_language;
use Drupal\Core\Render\MainContent\ModalRenderer;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Symfony\Component\HttpFoundation\Request;
/**
* Social Language main content renderer for modal dialog requests.
*/
class SocialLanguageModalRenderer extends ModalRenderer {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
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);
}
}
Classes
Name | Description |
---|---|
SocialLanguageModalRenderer | Social Language main content renderer for modal dialog requests. |