/**
  * Get the parameter which is the varying part
  *
  * @param array $activity
  * @return bool|int False if the activity should not be grouped, parameter position otherwise
  */
 protected function getGroupParameter($activity)
 {
     if (!$this->allowGrouping) {
         return false;
     }
     // Allow other apps to group their notifications
     return $this->activityManager->getGroupParameter($activity);
 }
示例#2
0
 protected function getGroupParameter($activity)
 {
     if (!$this->allowGrouping) {
         return false;
     }
     if ($activity['app'] === 'files') {
         switch ($activity['subject']) {
             case 'created_self':
             case 'created_by':
             case 'changed_self':
             case 'changed_by':
             case 'deleted_self':
             case 'deleted_by':
                 return 0;
         }
     }
     // Allow other apps to group their notifications
     return $this->activityManager->getGroupParameter($activity);
 }