Contentserv PHP API

CSCara
in package

Tags

Table of Contents

addNotificationUserAction()  : int
Creates an user action for the corresponding Notification
checkNotificationState()  : bool
Checks the notification state for the given parameters
createNotification()  : CSCaraApiNotification
Creates the Notification API object and returns the notification id
getNotificationCategories()  : array<string|int, mixed>
This method delivers the possible categories
getNotificationForExternalId()  : null|CSCaraApiNotification
Retrieves the Notification API for the given ExternalId
getNotifications()  : array<string|int, CSCaraApiNotification>
Returns the notification API objects.
storeNotification()  : bool
Stores the Notification object with the data to the database.

Methods

addNotificationUserAction()

Creates an user action for the corresponding Notification

public static addNotificationUserAction(int $iNotificationId, int $iUserId, string $sAction, string $sDate[, string $sContext = '' ]) : int
Parameters
$iNotificationId : int

The id of the notification action

$iUserId : int

The user id of the notification action

$sAction : string

The action of the notification action

$sDate : string

The date of the notification action

$sContext : string = ''

The context of the notification action

Tags
Return values
int

The notification action id

checkNotificationState()

Checks the notification state for the given parameters

public static checkNotificationState(int $iNotificationId, int $iUserId, int $iAction) : bool
Parameters
$iNotificationId : int

The notification to check the state for

$iUserId : int

The user to which we want to check the state

$iAction : int

The particular action that we want to check if it was already executed

Tags
Return values
bool

Returns true if state is already present, false otherwise

createNotification()

Creates the Notification API object and returns the notification id

public static createNotification(string $sTitle, string $sDescription, string $sValidFrom, string $sValidTo) : CSCaraApiNotification
Parameters
$sTitle : string

The title of the notification to create

$sDescription : string

The description of the notification

$sValidFrom : string

The valid from date of the notification

$sValidTo : string

The valid to date of the notification

Tags
Return values
CSCaraApiNotification

Notification The object Api

getNotificationCategories()

This method delivers the possible categories

public static getNotificationCategories(int $iLanguageID) : array<string|int, mixed>
Parameters
$iLanguageID : int

the language id

Tags
Return values
array<string|int, mixed>

all available categories

getNotificationForExternalId()

Retrieves the Notification API for the given ExternalId

public static getNotificationForExternalId(int $iExternalId) : null|CSCaraApiNotification
Parameters
$iExternalId : int

The ExternalId to be verified

Tags
Return values
null|CSCaraApiNotification

Returns the object Notification API, or null if no results found

storeNotification()

Stores the Notification object with the data to the database.

public static storeNotification(CSCaraApiNotification $oNotification) : bool
Parameters
$oNotification : CSCaraApiNotification

A Notification API object with the data to be stored in the database.

Tags
throws
CSException
Return values
bool

whether the storing of the rule was successful


        

Search results