class EnrolmentUserDisplayName in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- 8.5 modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- 8.6 modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- 8.7 modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- 8.8 modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- 10.3.x modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- 10.0.x modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- 10.2.x modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserDisplayName.php \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
Provides a 'EnrolmentUserDisplayName' user export row.
Plugin annotation
@UserExportPlugin(
id = "enrolment_display_name",
label = @Translation("Display name"),
weight = -450,
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\social_user_export\Plugin\UserExportPluginBase implements ContainerFactoryPluginInterface, UserExportPluginInterface uses StringTranslationTrait
- class \Drupal\social_user_export\Plugin\UserExportPlugin\UserDisplayName
- class \Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPlugin\EnrolmentUserDisplayName
- class \Drupal\social_user_export\Plugin\UserExportPlugin\UserDisplayName
- class \Drupal\social_user_export\Plugin\UserExportPluginBase implements ContainerFactoryPluginInterface, UserExportPluginInterface uses StringTranslationTrait
Expanded class hierarchy of EnrolmentUserDisplayName
File
- modules/
social_features/ social_event/ modules/ social_event_an_enroll_enrolments_export/ src/ Plugin/ UserExportPlugin/ EnrolmentUserDisplayName.php, line 22
Namespace
Drupal\social_event_an_enroll_enrolments_export\Plugin\UserExportPluginView source
class EnrolmentUserDisplayName extends UserDisplayName {
/**
* The event an enroll manager.
*
* @var \Drupal\social_event_an_enroll\EventAnEnrollManager
*/
protected $socialEventAnEnrollManager;
/**
* EnrolmentUserDisplayName constructor.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter.
* @param \Drupal\Core\Database\Connection $database
* The database connection.
* @param \Drupal\social_event_an_enroll\EventAnEnrollManager $social_event_an_enroll_manager
* The event an enroll manager.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, DateFormatterInterface $date_formatter, Connection $database, EventAnEnrollManager $social_event_an_enroll_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $date_formatter, $database);
$this->socialEventAnEnrollManager = $social_event_an_enroll_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('entity_type.manager'), $container
->get('date.formatter'), $container
->get('database'), $container
->get('social_event_an_enroll.manager'));
}
/**
* {@inheritdoc}
*/
public function getValue(UserInterface $entity) {
if ($entity
->isAnonymous()) {
$value = $this->socialEventAnEnrollManager
->getGuestName($this->configuration['entity'], FALSE);
return $value ?: $this
->t('Guest');
}
return parent::getValue($entity);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EnrolmentUserDisplayName:: |
protected | property | The event an enroll manager. | |
EnrolmentUserDisplayName:: |
public static | function |
The create method. Overrides UserExportPluginBase:: |
|
EnrolmentUserDisplayName:: |
public | function |
Returns the value. Overrides UserDisplayName:: |
|
EnrolmentUserDisplayName:: |
public | function |
EnrolmentUserDisplayName constructor. Overrides UserExportPluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
2 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
UserDisplayName:: |
public | function |
Returns the header. Overrides UserExportPluginBase:: |
|
UserExportPluginBase:: |
public | property | The database. | |
UserExportPluginBase:: |
public | property | The date formatter. | |
UserExportPluginBase:: |
public | property | The entity type manager. | |
UserExportPluginBase:: |
public | function |
Get the Profile entity. Overrides UserExportPluginInterface:: |
|
UserExportPluginBase:: |
public | function |
Returns the value for the address field and element within address. Overrides UserExportPluginInterface:: |
|
UserExportPluginBase:: |
public | function |
Returns the value of a field for a given profile. Overrides UserExportPluginInterface:: |
|
UserExportPluginBase:: |
public | function |
Returns the values of a taxonomy reference field. Overrides UserExportPluginInterface:: |