Exemplo n.º 1
0
 /**
  * Get the prepared activities
  *
  * @return array translated activities ready for use
  */
 public function getActivities()
 {
     $this->closeOpenGroup();
     $return = array();
     foreach ($this->activities as $activity) {
         $activity = $this->dataHelper->formatStrings($activity, 'subject');
         $activity = $this->dataHelper->formatStrings($activity, 'message');
         $activity['typeicon'] = $this->activityManager->getTypeIcon($activity['type']);
         $return[] = $activity;
     }
     return $return;
 }
Exemplo n.º 2
0
 /**
  * Get the prepared activities
  *
  * @return array translated activities ready for use
  */
 public function getActivities()
 {
     $this->closeOpenGroup();
     $return = array();
     foreach ($this->activities as $activity) {
         $this->activityManager->setFormattingObject($activity['object_type'], $activity['object_id']);
         $activity = $this->dataHelper->formatStrings($activity, 'subject');
         $activity = $this->dataHelper->formatStrings($activity, 'message');
         foreach ($activity['subjectparams'] as $i => $param) {
             /** @var IParameter $param */
             $activity['subjectparams'][$i] = $param->getParameterInfo();
         }
         foreach ($activity['messageparams'] as $i => $param) {
             /** @var IParameter $param */
             $activity['messageparams'][$i] = $param->getParameterInfo();
         }
         $activity['typeicon'] = $this->activityManager->getTypeIcon($activity['type']);
         $return[] = $activity;
     }
     $this->activityManager->setFormattingObject('', 0);
     $this->activities = [];
     return $return;
 }