All Data Structures Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions
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 shouldResolveSearchAttributeDataForLatestActivities ()
 

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
$modelClassNames
$relationItemIds
$ownedByFilter
Returns
array

Definition at line 64 of file LatestActivitiesUtil.php.

static shouldResolveSearchAttributeDataForLatestActivities ( )
staticprotected
Returns
bool

Definition at line 116 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 127 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 148 of file LatestActivitiesUtil.php.


The documentation for this class was generated from the following file:
Generated on Sun May 31 2020 07:10:50