All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Static Protected Member Functions
MashableActivityRules Class Reference
Inheritance diagram for MashableActivityRules:
ActivityMashableActivityRules ConversationMashableActivityRules EmailMessageMashableActivityRules MissionMashableActivityRules MeetingMashableActivityRules NoteMashableActivityRules TaskMashableActivityRules

Public Member Functions

 resolveSearchAttributesDataByRelatedItemId ($relationItemId)
 
 resolveSearchAttributesDataByRelatedItemIds ($relationItemIds)
 
 resolveSearchAttributeDataForLatestActivities ($searchAttributeData)
 
 getLatestActivitiesOrderByAttributeName ()
 
 getLatestActivityExtraDisplayStringByModel ($model)
 
 renderRelatedModelsByImportanceContent (RedBeanModel $model)
 
 resolveSearchAttributeDataForAllLatestActivities ($searchAttributeData)
 
 getSummaryContentTemplate ($ownedByFilter, $viewModuleClassName)
 
 resolveAdditionalSearchAttributesDataByModelClassNameAndRelatedItemIds ($modelClassName, $relationItemIds, $ownedByFilter, $shouldResolveSearchAttributeDataForLatestActivities, &$modelClassNamesAndSearchAttributeData)
 

Static Public Member Functions

static resolveSearchAttributesDataByOwnedByFilter (&$searchAttributesData, $ownedByFilter)
 
static resolveSearchAttributesDataStructure (&$searchAttributesDataStructure)
 

Static Protected Member Functions

static resolveStringValueModelsDataToStringContent ($modelsAndStringData)
 
static resolveSearchAttributesDataByOwnedByFilterClauses (&$searchAttributesData, $userId)
 

Detailed Description

Class to help interacting with classes that implement the MashableActivityInterface. An example is the latest activity view which contains a mashable activity feed for things that have occured in the past. Either related to a specific model or generically across the entire system.

Definition at line 42 of file MashableActivityRules.php.

Member Function Documentation

resolveSearchAttributesDataByRelatedItemId (   $relationItemId)
abstract

Given an item id of a related model, make a searchAttributesData array that includes that item id as a filter for the query.

Parameters
integer$relationItemId
resolveSearchAttributesDataByRelatedItemIds (   $relationItemIds)
abstract

Given multiple item ids of related models, make a searchAttributesData array that includes these item ids as filters for the query.

Parameters
array$relationItemIds
resolveSearchAttributeDataForLatestActivities (   $searchAttributeData)
abstract

Given a searchAttributeData array, add any extra filtering needed for the query based on the model specific requirements for what should be shown in a mashable activity feed.

Parameters
array$searchAttributeData
getLatestActivitiesOrderByAttributeName ( )
abstract

For a given model, what attribute is used for the ordering in a latest activity feed.

getLatestActivityExtraDisplayStringByModel (   $model)
abstract

Override if you want to display anything extra in the view for a particular model.

renderRelatedModelsByImportanceContent ( RedBeanModel  $model)

Override to define how related models are displayed if at all.

Parameters
RedBeanModel$model

Definition at line 79 of file MashableActivityRules.php.

resolveSearchAttributeDataForAllLatestActivities (   $searchAttributeData)

Override if you need to filter specifically for showing all latest activities that are not filtered by a related model

Parameters
$searchAttributeData
Returns
mixed

Definition at line 89 of file MashableActivityRules.php.

getSummaryContentTemplate (   $ownedByFilter,
  $viewModuleClassName 
)

Override to customize summary content.

Parameters
string$ownedByFilter
string$viewModuleClassName

Definition at line 99 of file MashableActivityRules.php.

static resolveStringValueModelsDataToStringContent (   $modelsAndStringData)
staticprotected
Parameters
array$modelsAndStringData
Returns
null|string

Definition at line 118 of file MashableActivityRules.php.

static resolveSearchAttributesDataByOwnedByFilter ( $searchAttributesData,
  $ownedByFilter 
)
static
Parameters
array$searchAttributesData
$ownedByFilter

Definition at line 137 of file MashableActivityRules.php.

static resolveSearchAttributesDataStructure ( $searchAttributesDataStructure)
static

Override if needed to massage the searchAttributesData['structure'] before processing

See Also
EmailMessageMashableActivityRules for an example of an override
Parameters
$searchAttributesDataStructure

Definition at line 162 of file MashableActivityRules.php.

resolveAdditionalSearchAttributesDataByModelClassNameAndRelatedItemIds (   $modelClassName,
  $relationItemIds,
  $ownedByFilter,
  $shouldResolveSearchAttributeDataForLatestActivities,
$modelClassNamesAndSearchAttributeData 
)

Override if you need to add additional search data.

See Also
EmailMessageMashableActivityRules for an example of how this is utilized.
Parameters
$modelClassName
$relationItemIds
$ownedByFilter
$shouldResolveSearchAttributeDataForLatestActivities
$modelClassNamesAndSearchAttributeData

Definition at line 176 of file MashableActivityRules.php.

static resolveSearchAttributesDataByOwnedByFilterClauses ( $searchAttributesData,
  $userId 
)
staticprotected
Parameters
array$searchAttributesData
int$userId

Definition at line 187 of file MashableActivityRules.php.


The documentation for this class was generated from the following file:
Generated on Fri Feb 28 2020 07:10:53