You are here

public function SocialEventAnEnrollSendEmail::execute in Open Social 8.5

Same name and namespace in other branches
  1. 8.6 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php \Drupal\social_event_an_enroll\Plugin\Action\SocialEventAnEnrollSendEmail::execute()
  2. 8.7 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/Action/SocialEventAnEnrollSendEmail.php \Drupal\social_event_an_enroll\Plugin\Action\SocialEventAnEnrollSendEmail::execute()

Overrides SocialEventManagersSendEmail::execute

File

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

Class

SocialEventAnEnrollSendEmail
Send email to event enrollment users.

Namespace

Drupal\social_event_an_enroll\Plugin\Action

Code

public function execute($entity = NULL) {
  $this->entity = $entity;
  if ($this->socialEventAnEnrollManager
    ->isGuest($entity)) {
    $display_name = $this->socialEventAnEnrollManager
      ->getGuestName($entity, FALSE);
    if (!$display_name) {
      $display_name = t('Guest');
    }
    $this->configuration['display_name'] = $display_name;
  }
  parent::execute($entity);
}