LatestActivitiesUtil Class Reference

Inheritance diagram for LatestActivitiesUtil:

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.

$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.
array of model class names and display labels.

Definition at line 51 of file LatestActivitiesUtil.php.

static getSearchAttributesDataByModelClassNamesAndRelatedItemIds ( modelClassNames,
) [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.

array $modelClassNames
array $relationItemIds
array $modelClassNamesAndSearchAttributeData

Definition at line 63 of file LatestActivitiesUtil.php.

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

Resolves the $searchAttributesData for each type of MashableActivity based on

See also:

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.

array $modelClassNames
array $modelClassNamesAndSortAttributes

Definition at line 121 of file LatestActivitiesUtil.php.

static resolveMashableModelClassNamesByFilteredBy ( mashableModelClassNames,
) [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.

array $mashableModelClassNames
string $filteredByModelName
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 Sat May 27 07:10:26 2017