You are here

class SocialLanguageModalRenderer in Open Social 8

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

Social Language main content renderer for modal dialog requests.

Hierarchy

Expanded class hierarchy of SocialLanguageModalRenderer

File

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

Namespace

Drupal\social_language
View source
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);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DialogRenderer::$renderer protected property The renderer. 1
DialogRenderer::$titleResolver protected property The title resolver.
DialogRenderer::determineTargetSelector protected function Determine the target selector for the OpenDialogCommand.
DialogRenderer::__construct public function Constructs a new DialogRenderer. 2
SocialLanguageModalRenderer::renderResponse public function Renders the main content render array into a response. Overrides ModalRenderer::renderResponse
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.