You are here

public function UserLanguageCode::getValue in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguageCode::getValue()
  2. 8.7 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguageCode::getValue()
  3. 8.8 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguageCode::getValue()
  4. 10.0.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguageCode::getValue()
  5. 10.1.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguageCode::getValue()
  6. 10.2.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php \Drupal\social_language\Plugin\UserExportPlugin\UserLanguageCode::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/UserLanguageCode.php, line 29

Class

UserLanguageCode
Provides a 'UserLanguageCode' user export row.

Namespace

Drupal\social_language\Plugin\UserExportPlugin

Code

public function getValue(UserInterface $entity) : string {
  return $entity
    ->getPreferredLangcode();
}