LatestActivitiesUtil Class Reference

Inheritance diagram for LatestActivitiesUtil:
DedupesActivitiesUtil

Static Public Member Functions

static getMashableModelDataForCurrentUser ($includeHavingRelatedItems=true)
static getSearchAttributesDataByModelClassNamesAndRelatedItemIds ($modelClassNames, $relationItemIds, $ownedByFilter)
static getSortAttributesByMashableModelClassNames ($modelClassNames)
static resolveMashableModelClassNamesByFilteredBy ($mashableModelClassNames, $filteredByModelName)
static getCountByModelClassName ($modelClassName, $relationItemIds, $ownedByFilter)

Static Protected Member Functions

static resolveSearchAttributeDataForLatestActivities (&$searchAttributesData, $mashableActivityRules)

Detailed Description

Helper class for working with latest activity views.

Definition at line 40 of file LatestActivitiesUtil.php.


Member Function Documentation

static getMashableModelDataForCurrentUser ( includeHavingRelatedItems = true  )  [static]

Based on the current user, return model class names and thier display labels. Only include models that the user has a right to access its corresponding module, as well as only models that implement the MashableActivityInterface.

Parameters:
$includeHavingRelatedItems - if the returning data should include models that are mashable but are connected via activityItems. An example is accounts, a mission is not conneted to an account so if this setting is false, accounts would not be returned. Home/User are always returned.
Returns:
array of model class names and display labels.

Definition at line 51 of file LatestActivitiesUtil.php.

static getSearchAttributesDataByModelClassNamesAndRelatedItemIds ( modelClassNames,
relationItemIds,
ownedByFilter 
) [static]

Given an array of modelClassNames and relationItemIds build an array of searchAttributeData that can be used by the RedBeanModelsDataProvider to produce a union query of data.

Parameters:
array $modelClassNames
array $relationItemIds
Returns:
array $modelClassNamesAndSearchAttributeData

Definition at line 63 of file LatestActivitiesUtil.php.

static resolveSearchAttributeDataForLatestActivities ( &$  searchAttributesData,
mashableActivityRules 
) [static, protected]

Resolves the $searchAttributesData for each type of MashableActivity based on

See also:
MashableActivityRules
Parameters:
$searchAttributesData 
$mashableActivityRules 

Reimplemented in DedupesActivitiesUtil.

Definition at line 109 of file LatestActivitiesUtil.php.

static getSortAttributesByMashableModelClassNames ( modelClassNames  )  [static]

Given an array of modelClassNames build an array of sortAttributeData that can be used by the RedBeanModelsDataProvider to produce a union query of data.

Parameters:
array $modelClassNames
Returns:
array $modelClassNamesAndSortAttributes

Definition at line 121 of file LatestActivitiesUtil.php.

static resolveMashableModelClassNamesByFilteredBy ( mashableModelClassNames,
filteredByModelName 
) [static]

Given an array of $mashableModelClassNames, filter out and return that array based on the $filteredByModelName value. If $filteredByModelName is set to LatestActivitiesConfigurationForm::FILTERED_BY_ALL then the array will be returned as it was passed in, otherwise filter the array to a specific model.

Parameters:
array $mashableModelClassNames
string $filteredByModelName
Returns:
array of filtered $mashableModelClassNames

Definition at line 142 of file LatestActivitiesUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Mar 28 07:10:25 2017