You are here

public function SocialEventAnEnrollSendEmail::getDisplayName in Open Social 8.9

Same name and namespace in other branches
  1. 8.8 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php \Drupal\social_event_an_enroll\Plugin\Action\SocialEventAnEnrollSendEmail::getDisplayName()
  2. 10.3.x modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php \Drupal\social_event_an_enroll\Plugin\Action\SocialEventAnEnrollSendEmail::getDisplayName()
  3. 10.0.x modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php \Drupal\social_event_an_enroll\Plugin\Action\SocialEventAnEnrollSendEmail::getDisplayName()
  4. 10.1.x modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php \Drupal\social_event_an_enroll\Plugin\Action\SocialEventAnEnrollSendEmail::getDisplayName()
  5. 10.2.x modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php \Drupal\social_event_an_enroll\Plugin\Action\SocialEventAnEnrollSendEmail::getDisplayName()

Get the display name of the guest.

Parameters

\Drupal\social_event\EventEnrollmentInterface $entity: The event enrolment to get the name from.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup|string The name of the guest enrolment.

1 call to SocialEventAnEnrollSendEmail::getDisplayName()
SocialEventAnEnrollSendEmail::executeMultiple in modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php

File

modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php, line 164

Class

SocialEventAnEnrollSendEmail
Send email to event enrollment users.

Namespace

Drupal\social_event_an_enroll\Plugin\Action

Code

public function getDisplayName(EventEnrollmentInterface $entity) {
  $display_name = $this->socialEventAnEnrollManager
    ->getGuestName($entity, FALSE);
  if (!$display_name) {
    $display_name = $this
      ->t('Guest');
  }
  return $display_name;
}