You are here

class PrivateMessageMailer in Open Social 10.0.x

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.3 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  4. 8.4 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  5. 8.5 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  6. 8.6 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  7. 8.7 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  8. 8.8 modules/social_features/social_private_message/src/Service/PrivateMessageMailer.php \Drupal\social_private_message\Service\PrivateMessageMailer
  9. 10.3.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

  • class \Drupal\social_private_message\Service\PrivateMessageMailer extends \Drupal\private_message\Service\PrivateMessageMailer

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 || !$member
        ->hasPermission('use private messaging system')) {
        unset($members[$id]);
      }
    }
    parent::send($message, $thread, $members);
  }

}

Members