Notification
extends Notification
in package
implements
ShouldQueue
Uses
Queueable
AbstractYes
Class Notification.
Tags
Table of Contents
Interfaces
- ShouldQueue
Properties
- $data : array<string|int, mixed>
- $manager : NotificationManagerInterface
- $model : mixed
- $notifiable : IsNotifiable|null
- $type : string
- Indicates notification type.
- $user : UserEntity|null
Methods
- __construct() : mixed
- Notification constructor.
- callbackMessage() : string|null
- getLocale() : string|null
- getType() : string
- Get notification type.
- localize() : string
- setData() : void
- Assign value of data column in table notifications.
- setModel() : void
- Set model for notification.
- setNotifiable() : self
- setUser() : void
- toArray() : array<string|int, mixed>
- Must return an array to store to database.
- toLink() : string|null
- toMobileMessage() : array<string, mixed>
- toRouter() : string|null
- toTextMessage() : Message|null
- toUrl() : string|null
- via() : array<string|int, string>
Properties
$data
protected
array<string|int, mixed>
$data
= []
$manager
protected
NotificationManagerInterface
$manager
$model
protected
mixed
$model
$notifiable
protected
IsNotifiable|null
$notifiable
= null
$type
Indicates notification type.
protected
string
$type
$user
protected
UserEntity|null
$user
= null
Methods
__construct()
Notification constructor.
public
__construct([mixed $model = null ]) : mixed
Parameters
- $model : mixed = null
callbackMessage()
public
abstract callbackMessage() : string|null
Return values
string|nullgetLocale()
public
getLocale() : string|null
Return values
string|nullgetType()
Get notification type.
public
getType() : string
Return values
stringlocalize()
public
localize([string|null $key = null ][, array<string, mixed> $replace = [] ]) : string
Parameters
- $key : string|null = null
- $replace : array<string, mixed> = []
Return values
stringsetData()
Assign value of data column in table notifications.
public
setData(array<int, mixed> $data) : void
Parameters
- $data : array<int, mixed>
setModel()
Set model for notification.
public
setModel(Entity $item) : void
Parameters
- $item : Entity
setNotifiable()
public
setNotifiable(IsNotifiable|null $notifiable) : self
Parameters
- $notifiable : IsNotifiable|null
Return values
selfsetUser()
public
setUser(UserEntity|null $user) : void
Parameters
- $user : UserEntity|null
toArray()
Must return an array to store to database.
public
abstract toArray(IsNotifiable $notifiable) : array<string|int, mixed>
Parameters
- $notifiable : IsNotifiable
Return values
array<string|int, mixed>toLink()
public
toLink() : string|null
Return values
string|nulltoMobileMessage()
public
toMobileMessage(IsNotifiable $notifiable) : array<string, mixed>
Parameters
- $notifiable : IsNotifiable
Return values
array<string, mixed>toRouter()
public
toRouter() : string|null
Return values
string|nulltoTextMessage()
public
toTextMessage(IsNotifiable $notifiable) : Message|null
Parameters
- $notifiable : IsNotifiable
Return values
Message|nulltoUrl()
public
toUrl() : string|null
Return values
string|nullvia()
public
via(IsNotifiable $notifiable) : array<string|int, string>
Parameters
- $notifiable : IsNotifiable