class Notification implements ExtenderInterface

Methods

type(string $blueprint, array $driversEnabledByDefault = [])

No description

driver(string $driverName, string $driver, array $typesEnabledByDefault = [])

No description

beforeSending(callable|string $callback)

No description

void
extend( Container $container, Extension|null $extension = null)

No description

Details

Notification type(string $blueprint, array $driversEnabledByDefault = [])

Parameters

string $blueprint : The ::class attribute of the blueprint class. This blueprint should implement \Flarum\Notification\Blueprint\BlueprintInterface.
array $driversEnabledByDefault : The names of the drivers enabled by default for this notification type. (example: alert, email).

Return Value

Notification

Notification driver(string $driverName, string $driver, array $typesEnabledByDefault = [])

Parameters

string $driverName : The name of the notification driver.
string $driver : The ::class attribute of the driver class. This driver should implement \Flarum\Notification\Driver\NotificationDriverInterface.
array $typesEnabledByDefault : The names of blueprint classes of types enabled by default for this driver.

Return Value

Notification

Notification beforeSending(callable|string $callback)

Parameters

callable|string $callback The callback can be a closure or an invokable class, and should accept: - \Flarum\Notification\Blueprint\BlueprintInterface $blueprint - \Flarum\User\User[] $newRecipients The callable should return an array of recipients. - \Flarum\User\User[] $newRecipients

Return Value

Notification

void extend( Container $container, Extension|null $extension = null)

Parameters

Container $container
Extension|null $extension

Return Value

void