ChangeRequestNotificationService
class ChangeRequestNotificationService implements ChangeRequestNotifierInterface (View source)
Writes the zone audit line for each change request event, then emails the reviewers of the zone when a request is filed and the requester when it is decided. Mail failures are logged and reported as false; nothing here throws to the caller, so a mail problem never blocks a request.
Constants
| KIND_RECORDS |
|
| KIND_ZONE_DELETE |
|
Methods
No description
The request was approved (applied or failed to apply) or rejected.
Mail every reviewer of the zone about a newly filed request.
Mail the requester about the outcome of their request.
Details
__construct(UserNotificationRecipientInterface $recipients, ConfigurationInterface $config, MailService $mailService, EmailTemplateService $emailTemplateService, DomainRepositoryInterface $domainRepository, PermissionService $permissions, UrlService $urlService, LoggerInterface|null $logger = null, AuditService|null $audit = null, SOARecordManagerInterface|null $soaRecords = null)
No description
void
requestFiled(ZoneChangeRequest $request)
No description
void
requestDecided(ZoneChangeRequest $request)
The request was approved (applied or failed to apply) or rejected.
void
requestCancelled(ZoneChangeRequest $request)
No description
bool
notifyRequestFiled(int $requestId, int $zoneId, string $zoneName, int $requesterId, string $requesterName, string|null $comment, string $kind)
Mail every reviewer of the zone about a newly filed request.
Reviewers are the active users with an email address for whom ChangeApprovalPolicy::canReview() holds, minus the requester. This walks all active users, which is acceptable because filing a request is rare.
bool
notifyRequestDecided(int $requestId, int $zoneId, string $zoneName, int $requesterId, string $status, int $reviewerId, string|null $reviewComment)
Mail the requester about the outcome of their request.