Class to handle turning raw discussion news feed events into renderable output

author kier

 Methods

Determines if the given news feed item is viewable.

canViewNewsFeedItem(array $item, mixed $content, array $viewingUser) : boolean
Inherited
inherited_from \XenForo_NewsFeedHandler_Abstract::canViewNewsFeedItem()

Parameters

$item

array

$content

mixed

$viewingUser

array

Returns

boolean

Factory method to get the named news feed handler.

create(string $class) : \XenForo_NewsFeedHandler_Abstract
InheritedStatic

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

inherited_from \XenForo_NewsFeedHandler_Abstract::create()

Parameters

$class

string

Class to load

Returns

Fetches the content required by news feed items.

getContentByIds(array $contentIds, \XenForo_Model_NewsFeed $model, array $viewingUser) : array
Inherited

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

inherited_from \XenForo_NewsFeedHandler_Abstract::getContentByIds()

Parameters

$contentIds

array

$viewingUser

array

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

Returns

array

Prepares a news feed item for rendering.

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

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

inherited_from \XenForo_NewsFeedHandler_Abstract::prepareNewsFeedItem()

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_NewsFeedHandler_Abstract::renderHtml()

Parameters

$item

array

Returns

Fetches the name(s) of the primary key(s) for the table being dealt with

_getContentPrimaryKeynames() : array

Returns

array

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

_getDefaultTemplateTitle(string $contentType, string $action) : string
Inherited
inherited_from \XenForo_NewsFeedHandler_Abstract::_getDefaultTemplateTitle()

Parameters

$contentType

string

$action

string

Returns

string

Prepares the news feed item for display

_prepareNewsFeedItemAfterAction(array $item, array $content, array $viewingUser) : array

Parameters

$item

array

News feed item

$content

array

News feed item content

$viewingUser

array

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

Returns

array

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

_prepareNewsFeedItemBeforeAction(array $item, $content, array $viewingUser) : array
Inherited
inherited_from \XenForo_NewsFeedHandler_Abstract::_prepareNewsFeedItemBeforeAction()

Parameters

$item

$content

$viewingUser

array

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

Returns

array