You are here

private function TrailingSlashUrlGenerator::getLanguagePrefix in Trailing Slash 8

Parameters

$route_name:

$options:

Return value

string

1 call to TrailingSlashUrlGenerator::getLanguagePrefix()
TrailingSlashUrlGenerator::generateFromRoute in src/Routing/TrailingSlashUrlGenerator.php
Generates a URL or path for a specific route based on the given parameters.

File

src/Routing/TrailingSlashUrlGenerator.php, line 74

Class

TrailingSlashUrlGenerator
Generates URLs from route names and parameters.

Namespace

Drupal\trailing_slash\Routing

Code

private function getLanguagePrefix($route_name, $options) {
  $language_options = $options;
  $this->pathProcessorLanguage
    ->processOutbound($route_name, $language_options, $this->requestStack
    ->getCurrentRequest());
  return !empty($language_options['prefix']) ? $language_options['prefix'] : '';
}