Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
Static Public Member Functions
NotificationSubscriberUtil Class Reference

Static Public Member Functions

static getSubscriberData (OwnedSecurableItem $model)
 
static renderSubscriberImageAndLinkContent (User $user, $imageSize=36, $class=null)
 
static getModelSubscribers (OwnedSecurableItem $model)
 
static markUserHasReadLatest (OwnedSecurableItem $model, User $user, $hasReadLatest=true)
 
static registerSubscriptionScript ($modelClassName, $model=null)
 
static registerUnsubscriptionScript ($modelClassName, $model=null)
 
static getKanbanSubscriptionScript ($url, $sourceClass, $targetClass, $link)
 
static getDetailSubscriptionScript ($url, $sourceClass, $targetClass, $link, $taskId)
 
static getKanbanSubscriptionLink (OwnedSecurableItem $model, $row)
 
static getDetailSubscriptionLink (OwnedSecurableItem $model, $row)
 
static resolveSubscriptionLink (OwnedSecurableItem $model, $subscribeLinkClass, $unsubscribeLinkClass)
 
static addSubscriber (User $user, OwnedSecurableItem $model, $hasReadLatest=false)
 
static resolveAndRenderTaskCardDetailsSubscribersContent (OwnedSecurableItem $model)
 
static processSubscriptionRequest (OwnedSecurableItem $model, User $user)
 
static processUnsubscriptionRequest (OwnedSecurableItem $model, User $user)
 
static doNotificationSubscribersContainPerson (OwnedSecurableItem $model, Item $item)
 

Detailed Description

Helper class to work with notification subscribers.

Definition at line 40 of file NotificationSubscriberUtil.php.

Member Function Documentation

static getSubscriberData ( OwnedSecurableItem  $model)
static

Get model subscriber data

Parameters
OwnedSecurableItem$model
Returns
string

Definition at line 47 of file NotificationSubscriberUtil.php.

static renderSubscriberImageAndLinkContent ( User  $user,
  $imageSize = 36,
  $class = null 
)
static

Renders subscriber image and link content

Parameters
User$user
int$imageSize
string$class
Returns
string

Definition at line 72 of file NotificationSubscriberUtil.php.

static getModelSubscribers ( OwnedSecurableItem  $model)
static

Gets model participant

Parameters
OwnedSecurableItem$model
Returns
array

Definition at line 90 of file NotificationSubscriberUtil.php.

static markUserHasReadLatest ( OwnedSecurableItem  $model,
User  $user,
  $hasReadLatest = true 
)
static

Given a model and a user, mark that the user has read or not read the latest changes as a model owner, requested by user or subscriber

Parameters
OwnedSecurableItem$model
User$user
Boolean$hasReadLatest

Definition at line 108 of file NotificationSubscriberUtil.php.

static registerSubscriptionScript (   $modelClassName,
  $model = null 
)
static

Register subscription script

Parameters
string$modelClassName
OwnedSecurableItem$model

Definition at line 135 of file NotificationSubscriberUtil.php.

static registerUnsubscriptionScript (   $modelClassName,
  $model = null 
)
static

Register unsubscription script

Parameters
string$modelClassName
OwnedSecurableItem$model

Definition at line 162 of file NotificationSubscriberUtil.php.

static getKanbanSubscriptionScript (   $url,
  $sourceClass,
  $targetClass,
  $link 
)
static

Get subscription script

Parameters
string$url
string$sourceClass
string$targetClass
string$link
Returns
string

Definition at line 192 of file NotificationSubscriberUtil.php.

static getDetailSubscriptionScript (   $url,
  $sourceClass,
  $targetClass,
  $link,
  $taskId 
)
static

Get subscription script

Parameters
string$url
string$sourceClass
string$targetClass
string$link
Returns
string

Definition at line 233 of file NotificationSubscriberUtil.php.

static getKanbanSubscriptionLink ( OwnedSecurableItem  $model,
  $row 
)
static

Get kanban subscription link for the model. This would be in kanban view for a related model for e.g Project

Parameters
OwnedSecurableItem$model
int$row
Returns
string

Definition at line 274 of file NotificationSubscriberUtil.php.

static getDetailSubscriptionLink ( OwnedSecurableItem  $model,
  $row 
)
static

Get subscription link on the model detail view

Parameters
OwnedSecurableItem$model
int$row
Returns
string

Definition at line 285 of file NotificationSubscriberUtil.php.

static resolveSubscriptionLink ( OwnedSecurableItem  $model,
  $subscribeLinkClass,
  $unsubscribeLinkClass 
)
static

Resolve subscription link for detail and kanban view

Parameters
OwnedSecurableItem$model
string$subscribeLinkClass
string$unsubscribeLinkClass
Returns
string

Definition at line 297 of file NotificationSubscriberUtil.php.

static addSubscriber ( User  $user,
OwnedSecurableItem  $model,
  $hasReadLatest = false 
)
static

Add subscriber to the model

Parameters
User$user
OwnedSecurableItem$model
bool$hasReadLatest

Definition at line 331 of file NotificationSubscriberUtil.php.

static resolveAndRenderTaskCardDetailsSubscribersContent ( OwnedSecurableItem  $model)
static

Resolve and render task card details subscribers content

Parameters
OwnedSecurableItem$model
Returns
type

Definition at line 348 of file NotificationSubscriberUtil.php.

static processSubscriptionRequest ( OwnedSecurableItem  $model,
User  $user 
)
static

Process subscription request for model

Parameters
OwnedSecurableItem$model
User$user
Returns
OwnedSecurableItem $model | error
Exceptions
Exception
NotFoundException
NotSupportedException

Definition at line 385 of file NotificationSubscriberUtil.php.

static processUnsubscriptionRequest ( OwnedSecurableItem  $model,
User  $user 
)
static

Process unsubscription request for model

Parameters
OwnedSecurableItem$model
User$user
Returns
OwnedSecurableItem $model
Exceptions
Exception
FailedToSaveModelException
NotFoundException
NotSupportedException

Definition at line 409 of file NotificationSubscriberUtil.php.

static doNotificationSubscribersContainPerson ( OwnedSecurableItem  $model,
Item  $item 
)
static

Check if model have person(item) in list of its subscribers

Parameters
$model
Item$item
Returns
bool

Definition at line 434 of file NotificationSubscriberUtil.php.


The documentation for this class was generated from the following file:
Generated on Sat Aug 8 2020 07:10:54
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.