Neuron-PHP

RegistrationService

Handles notifications for event registrations.

Persistence is owned by the controller (persist-first, so a registration is never lost on email failure); this service resolves the admin recipient from configuration and delivers the admin notification plus an optional registrant confirmation using the CMS email Sender.

Configuration lives under the events.registration section: notify_email recipient for admin notifications (falls back to email.from_address) confirmation_enabled send a confirmation email to the registrant (default: false) success_message thank-you message shown after registering

Table of Contents

Properties

$_basePath  : string
$_sender  : Sender|null
$_settings  : SettingManager

Methods

__construct()  : mixed
getNotifyEmail()  : string|null
Resolve the admin notification recipient.
getSuccessMessage()  : string
The thank-you message shown after a successful registration.
isConfirmationEnabled()  : bool
Whether a confirmation email should be sent to the registrant.
notifyAdmin()  : bool
Notify the configured admin recipient of a new registration.
sendConfirmation()  : bool
Send a confirmation email to the registrant when enabled.
buildAdminPlainBody()  : string
Plain-text admin body fallback.
buildConfirmationPlainBody()  : string
Plain-text confirmation body fallback.
getRegistrationSetting()  : mixed
Read a value from the events.registration config section.

Properties

Methods

__construct()

public __construct(SettingManager $settings[, Sender|null $sender = null ][, string|null $basePath = null ]) : mixed
Parameters
$settings : SettingManager
$sender : Sender|null = null

Optional Sender (injectable for testing)

$basePath : string|null = null

Base path for email template resolution

getNotifyEmail()

Resolve the admin notification recipient.

public getNotifyEmail() : string|null
Return values
string|null

Null when no recipient can be determined

getSuccessMessage()

The thank-you message shown after a successful registration.

public getSuccessMessage() : string
Return values
string

isConfirmationEnabled()

Whether a confirmation email should be sent to the registrant.

public isConfirmationEnabled() : bool
Return values
bool

getRegistrationSetting()

Read a value from the events.registration config section.

private getRegistrationSetting(string $key) : mixed
Parameters
$key : string
On this page

Search results