public function UserLanguage::getValue in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguage.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguage::getValue()
- 8.7 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguage.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguage::getValue()
- 8.8 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguage.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguage::getValue()
- 10.3.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguage.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguage::getValue()
- 10.0.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguage.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguage::getValue()
- 10.1.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguage.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguage::getValue()
Returns the value.
Parameters
\Drupal\user\UserInterface $entity: The User entity to get the value from.
Return value
string The value.
Overrides UserExportPluginBase::getValue
File
- modules/
custom/ social_language/ src/ Plugin/ UserExportPlugin/ UserLanguage.php, line 92
Class
- UserLanguage
- Provides a 'UserLanguage' user export row.
Namespace
Drupal\social_language\Plugin\UserExportPluginCode
public function getValue(UserInterface $entity) : string {
return $this->languageManager
->getLanguage($entity
->getPreferredLangcode())
->getName();
}