AuditEventsRecentlyViewedUtil Class Reference

Static Public Member Functions

static getRecentlyViewedAjaxContentByUser (User $user, $count)
static getRecentlyViewedItemsByUser (User $user, $count)
static resolveNewRecentlyViewedModel ($moduleName, RedBeanModel $model, $count)
static deleteModelFromRecentlyViewed ($moduleName, RedBeanModel $model)

Data Fields

const RECENTLY_VIEWED_COUNT = 10

Static Protected Member Functions

static getRecentlyViewedAuditEventsByUser (User $user, $count)
static getRouteByAuditEvent (AuditEvent $auditEvent, $moduleClassName)
static getRecentlyViewedByUser (User $user, $count)
static getRouteByRecentlyViewed ($moduleClassName, $modelId)

Detailed Description

Helper class to render content for a list of recently viewed items.

Definition at line 40 of file AuditEventsRecentlyViewedUtil.php.


Member Function Documentation

static getRecentlyViewedAjaxContentByUser ( User user,
count 
) [static]

Get the content for displaying recently viewed information via an ajax call.

See also:
RecentlyViewedView
Parameters:
User $user
int $count
Returns:
null|string

Definition at line 51 of file AuditEventsRecentlyViewedUtil.php.

static getRecentlyViewedItemsByUser ( User user,
count 
) [static]

Get the recently viewed models as items which include a link and a moduleClassName.

See also:
RecentlyViewedView
Parameters:
User $user
int $count
Returns:
array

Definition at line 84 of file AuditEventsRecentlyViewedUtil.php.

static getRecentlyViewedAuditEventsByUser ( User user,
count 
) [static, protected]

Given a user and a count, get a tail of recent audit events for that user limited by the count.

Parameters:
User $user
int $count

Definition at line 113 of file AuditEventsRecentlyViewedUtil.php.

static getRouteByAuditEvent ( AuditEvent auditEvent,
moduleClassName 
) [static, protected]

Given an AuditEvent, build a route to the event's model's details action.

Parameters:
AuditEvent $auditEvent
string $moduleClassName
Returns:
mixed

Definition at line 125 of file AuditEventsRecentlyViewedUtil.php.

static getRecentlyViewedByUser ( User user,
count 
) [static, protected]

Given an user, get the recently viewed moduleClassName and modelId limited by count

Parameters:
User $user
integer $count
Returns:
array($moduleClassName, $modelId)

Definition at line 138 of file AuditEventsRecentlyViewedUtil.php.

static getRouteByRecentlyViewed ( moduleClassName,
modelId 
) [static, protected]

Returns the url for the details view of a modelId on the moduleClassName

Parameters:
string $moduleClassName
integer $modelId
Returns:
string

Definition at line 155 of file AuditEventsRecentlyViewedUtil.php.

static resolveNewRecentlyViewedModel ( moduleName,
RedBeanModel model,
count 
) [static]
Parameters:
$moduleName 
RedBeanModel $model
int $count

Definition at line 168 of file AuditEventsRecentlyViewedUtil.php.

static deleteModelFromRecentlyViewed ( moduleName,
RedBeanModel model 
) [static]
Parameters:
$moduleName 
RedBeanModel $model

Definition at line 203 of file AuditEventsRecentlyViewedUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Aug 21 07:10:22 2017