AirLay backend

NotificationSenderController extends ApiController
in package

Class ApiBaseController.

Table of Contents

$config  : AirlayConfig
$config  : AirlayConfig
$request  : Request
$user  : UserEntity
$status  : StatusPage|null
$tokenHandler  : TokenHandler|null
__destruct()  : mixed
addCategoryAction()  : string
Add category to notification sender.
afterExecuteRoute()  : mixed
beforeExecuteRoute()  : mixed
createAction()  : string
Create notification sender.
deleteAction()  : string
Delete notification sender.
getAction()  : string
Get notification senders.
indexAction()  : mixed
initialize()  : void
removeCategoryAction()  : string
Remove category from notification sender.
updateAction()  : string
Update notification sender.
updateCategoryAction()  : string
Update category from notification sender.
attachTmpFile()  : Response
firesAnRelationUpdateEvents()  : void
getId()  : mixed
getNormalizedUserId()  : int|ObjectId
getTranslator()  : NativeArray
getUserInfo()  : UserEntity
secureData()  : mixed
sendEmail()  : mixed
extractNotificationSenderFromPost()  : NotificationSenderEntity

Properties

Methods

addCategoryAction()

Add category to notification sender.

public addCategoryAction() : string

request([ 'method' => 'POST', 'url' => '/api/v4/notification_sender/addCategory' 'params' => [ [ 'name' => 'id', 'type' => 'objectId', 'description' => 'Notification sender id', 'required' => true ], [ 'name' => 'categoryId', 'type' => 'ObjectId', 'description' => 'Category id', 'required' => true ], [ 'name' => 'resendTimeOut', 'type' => 'int', 'description' => 'Resend time out, if -1 not resend', 'required' => true ],

]

]) response([ 'status' => 'OK', 'message' => EmailSenderEntity, 'code' => 0 ])

Tags
throws
AirlayException
Return values
string

afterExecuteRoute()

public afterExecuteRoute(Dispatcher $dispatcher) : mixed
Parameters
$dispatcher : Dispatcher
Return values
mixed

beforeExecuteRoute()

public beforeExecuteRoute(Dispatcher $dispatcher) : mixed
Parameters
$dispatcher : Dispatcher
Return values
mixed

createAction()

Create notification sender.

public createAction() : string

request([ 'method' => 'POST', 'url' => '/api/v4/notification_sender/create' 'params' => [ [ 'name' => 'title', 'type' => 'string', 'description' => 'Notification sender title', 'required' => true ], [ 'name' => 'templateId', 'type' => 'objectId', 'description' => 'Template id', 'required' => false ] ] ]) response([ 'status' => 'OK', 'message' => NotificationSenderEntity, 'code' => 0 ])

Tags
throws
AirlayException
Return values
string

deleteAction()

Delete notification sender.

public deleteAction() : string

request([ 'method' => 'POST', 'url' => '/api/v4/notification_sender/delete' 'params' => [ [ 'name' => 'id', 'type' => 'objectId', 'description' => 'Notification sender id', 'required' => true ] ] ]) response([ 'status' => 200, 'message' => 'Ok', 'code' => 0 ])

Tags
throws
AirlayException
Return values
string

getAction()

Get notification senders.

public getAction() : string

request([ 'method' => 'GET', 'url' => '/api/v4/notification_sender/get' 'params' => [ [ 'name' => 'id', 'type' => 'objectId', 'description' => 'Notification sender id', 'required' => false ] ] ]) response([ 'status' => 'OK', 'message' => NotificationSenderEntity[], 'code' => 0 ])

Tags
throws
AirlayException
Return values
string

removeCategoryAction()

Remove category from notification sender.

public removeCategoryAction() : string

request([ 'method' => 'POST', 'url' => '/api/v4/notification_sender/removeCategory' 'params' => [ [ 'name' => 'id', 'type' => 'objectId', 'description' => 'Notification sender id', 'required' => true ], [ 'name' => 'categoryId', 'type' => 'objectId', 'description' => 'Category id', 'required' => true ]

]

]) response([ 'status' => 'OK', 'message' => EmailSenderEntity, 'code' => 0 ])

Tags
throws
AirlayException
Return values
string

updateAction()

Update notification sender.

public updateAction() : string

request([ 'method' => 'POST', 'url' => '/api/v4/notification_sender/update' 'params' => [ [ 'name' => 'id', 'type' => 'objectId', 'description' => 'Notification sender id', 'required' => true ], [ 'name' => 'title', 'type' => 'string', 'description' => 'Notification sender title', 'required' => false ], [ 'name' => 'templateId', 'type' => 'objectId', 'description' => 'Template id', 'required' => false ] ] ]) response([ 'status' => 'OK', 'message' => EmailSenderEntity, 'code' => 0 ])

Tags
throws
AirlayException
Return values
string

updateCategoryAction()

Update category from notification sender.

public updateCategoryAction() : string

request([ 'method' => 'POST', 'url' => '/api/v4/notification_sender/updateCategory' 'params' => [ [ 'name' => 'id', 'type' => 'objectId', 'description' => 'Notification sender id', 'required' => true ], [ 'name' => 'categoryId', 'type' => 'objectId', 'description' => 'Category id', 'required' => true ] [ 'name' => 'resendTimeOut', 'type' => 'int', 'description' => 'Resend time out, if -1 not resend', 'required' => true ] ] ]) response([ 'status' => 'OK', 'message' => EmailSenderEntity, 'code' => 0 ])

Tags
throws
AirlayException
Return values
string

firesAnRelationUpdateEvents()

protected firesAnRelationUpdateEvents(array<string|int, mixed> $relations, ObjectId $dataSetId[, DataSetLogEntity|null $log = null ]) : void
Parameters
$relations : array<string|int, mixed>
$dataSetId : ObjectId
$log : DataSetLogEntity|null = null
Return values
void

getTranslator()

protected getTranslator([string|null $language = null ]) : NativeArray
Parameters
$language : string|null = null
Tags
throws
Exception
Return values
NativeArray

secureData()

protected secureData(mixed $data) : mixed
Parameters
$data : mixed
Return values
mixed

sendEmail()

protected sendEmail(string $email, string $name, string $subject, string $body) : mixed
Parameters
$email : string
$name : string
$subject : string
$body : string
Return values
mixed

Search results