Alert handler for users.

package XenForo_Alert
author kier

 Methods

Determines if the given alert is viewable.

canViewAlert(array $alert, mixed $content, array $viewingUser) : boolean
Inherited

inherited_from \XenForo_AlertHandler_Abstract::canViewAlert()

Parameters

$alert

array

$content

mixed

$viewingUser

array

Information about the viewing user (keys: user_id, permission_combination_id, permissions)

Returns

boolean

Factory method to get the named alert handler.

create(string $class) : \XenForo_AlertHandler_Abstract
Inherited

The class must exist and be autoloadable or an exception will be thrown.

inherited_from \XenForo_AlertHandler_Abstract::create()

Parameters

$class

string

Class to load

Returns

Fetches the content required by alerts.

getContentByIds(array $contentIds, \XenForo_Model_Alert $model, integer $userId, array $viewingUser) : array

Designed to be overridden by child classes using $model->getContentByIds($contentIds) or similar

Parameters

$contentIds

array

$model

\XenForo_Model_Alert

Alert model invoking this

$userId

integer

User ID the alerts are for

$viewingUser

array

Information about the viewing user (keys: user_id, permission_combination_id, permissions)

Returns

array

Prepares a news feed item for rendering.

prepareAlert(array $item, array $viewingUser) : array
Inherited

Designed to be overriden by extended classes, while retaining the call to _prepareAlert.

inherited_from \XenForo_AlertHandler_Abstract::prepareAlert()

Parameters

$item

$viewingUser

array

Information about the viewing user (keys: user_id, permission_combination_id, permissions)

Returns

array

Renders an item content template

renderHtml(array $item, \XenForo_View $view) : \XenForo_Template_Public
Inherited

inherited_from \XenForo_AlertHandler_Abstract::renderHtml()

Parameters

$item

array

Returns

Returns a template title in the form 'alert_{contentType}_{action}'

_getDefaultTemplateTitle(string $contentType, string $action) : string
Inherited

inherited_from \XenForo_AlertHandler_Abstract::_getDefaultTemplateTitle()

Parameters

$contentType

string

$action

string

Returns

string

Performs basic and generic preparation for alerts, AFTER content-type/action specific manipulation Designed to be overridden by child classes

_prepareAlertAfterAction(array $item, $content, array $viewingUser) : array
Inherited

inherited_from \XenForo_AlertHandler_Abstract::_prepareAlertAfterAction()

Parameters

$item

$content

$viewingUser

array

Information about the viewing user (keys: user_id, permission_combination_id, permissions)

Returns

array

Performs basic and generic preparation for alerts, BEFORE content-type/action specific manipulation Designed to be overridden by child classes

_prepareAlertBeforeAction(array $item, $content, array $viewingUser) : array
Inherited

inherited_from \XenForo_AlertHandler_Abstract::_prepareAlertBeforeAction()

Parameters

$item

$content

$viewingUser

array

Information about the viewing user (keys: user_id, permission_combination_id, permissions)

Returns

array

_prepareTrophy()

_prepareTrophy(array $item) 

Parameters

$item