UserLanguageCode.php in Open Social 10.0.x
Same filename and directory in other branches
- 8.9 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php
- 8.7 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php
- 8.8 modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php
- 10.3.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php
- 10.1.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php
- 10.2.x modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.php
File
modules/custom/social_language/src/Plugin/UserExportPlugin/UserLanguageCode.phpView source
<?php
namespace Drupal\social_language\Plugin\UserExportPlugin;
use Drupal\social_user_export\Plugin\UserExportPluginBase;
use Drupal\user\UserInterface;
/**
* Provides a 'UserLanguageCode' user export row.
*
* @UserExportPlugin(
* id = "user_language_code",
* label = @Translation("Language code"),
* weight = -340,
* )
*/
class UserLanguageCode extends UserExportPluginBase {
/**
* {@inheritdoc}
*/
public function getHeader() {
return $this
->t('Language code');
}
/**
* {@inheritdoc}
*/
public function getValue(UserInterface $entity) : string {
return $entity
->getPreferredLangcode();
}
}
Classes
Name | Description |
---|---|
UserLanguageCode | Provides a 'UserLanguageCode' user export row. |