You are here

class PrivateMessageMailer in Open Social 8.3

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  2. 8.2 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  3. 8.4 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  4. 8.5 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  5. 8.6 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  6. 8.7 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  7. 8.8 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  8. 10.3.x modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  9. 10.0.x modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  10. 10.1.x modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  11. 10.2.x modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer

A service class for sending notification emails for private messages.

Hierarchy

Expanded class hierarchy of PrivateMessageMailer

File

modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php, line 13

Namespace

Drupal\social_private_message\Service
View source
class PrivateMessageMailer extends PrivateMessageMailerBase {

  /**
   * {@inheritdoc}
   */
  public function send(PrivateMessageInterface $message, PrivateMessageThreadInterface $thread, array $members = []) {
    foreach ($members as $id => $member) {
      if (!$member instanceof UserInterface) {
        unset($members[$id]);
      }
    }
    parent::send($message, $thread, $members);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PrivateMessageMailer::$config private property The configuration factory service.
PrivateMessageMailer::$currentUser private property The current user.
PrivateMessageMailer::$mailManager private property The mail manager service.
PrivateMessageMailer::$privateMessageService private property The private message service.
PrivateMessageMailer::$userData private property The user data service.
PrivateMessageMailer::send public function Send a private message notification email. Overrides PrivateMessageMailer::send
PrivateMessageMailer::shouldSend private function Determines if the message should be sent.
PrivateMessageMailer::__construct public function Constructs a new PrivateMessageMailer object.