protected function LanguageNegotiation::mapNewMethods in Drupal 9
Same name and namespace in other branches
- 8 core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php \Drupal\language\Plugin\migrate\process\LanguageNegotiation::mapNewMethods()
Maps old negotiation method names to the new ones.
Parameters
string $value: The old negotiation method name.
Return value
string The new negotiation method name.
1 call to LanguageNegotiation::mapNewMethods()
- LanguageNegotiation::transform in core/
modules/ language/ src/ Plugin/ migrate/ process/ LanguageNegotiation.php - Performs the associated process.
File
- core/
modules/ language/ src/ Plugin/ migrate/ process/ LanguageNegotiation.php, line 60
Class
- LanguageNegotiation
- Processes the arrays for the language types' negotiation methods and weights.
Namespace
Drupal\language\Plugin\migrate\processCode
protected function mapNewMethods($value) {
switch ($value) {
case 'language-default':
return 'language-selected';
case 'locale-browser':
return 'language-browser';
case 'locale-interface':
return 'language-interface';
case 'locale-session':
return 'language-session';
case 'locale-url':
return 'language-url';
case 'locale-url-fallback':
return 'language-url-fallback';
case 'locale-user':
return 'language-user';
default:
return $value;
}
}