refactored time based field update stuff

This commit is contained in:
2022-05-13 17:46:29 +01:00
parent 18f8e6cab8
commit 21c84e21d2
2 changed files with 8 additions and 9 deletions

View File

@ -4,9 +4,8 @@ namespace Drupal\opencase;
use Drupal\user\Entity\User;
class EmailAlerter {
public function send_email_to_users_with_role(array $params, string $key, string $role): void {
public function send_email_to_users_with_role(array $params, string $key, string $role, string $module): void {
$mailManager = \Drupal::service('plugin.manager.mail');
$module = 'goodnightout_opencase';
$to = implode(',', $this->get_email_addresses_of_users_with_role($role));
$send = true;
$result = $mailManager->mail($module, $key, $to, NULL, $params, NULL, $send);