Пример #1
0
 /**
  * @param $userId
  * @param $page
  * @param $limit
  * @return array
  */
 public function getUserLogHistory($userId, $page, $limit)
 {
     if (!$userId) {
         return array();
     }
     $log = $this->logDao->findListForUser($userId, $page, $limit);
     $result = array();
     if ($log) {
         foreach ($log as $entry) {
             $entry['action'] = $this->getActionTitle($entry['pluginKey'], $entry['actionKey']);
             $result[$entry['id']] = $entry;
         }
     }
     return $result;
 }
Пример #2
0
 /**
  * @param $userId
  * @param $page
  * @param $limit
  * @return array
  */
 public function getUserLogHistory($userId, $page, $limit)
 {
     if (!$userId) {
         return array();
     }
     $log = $this->logDao->findListForUser($userId, $page, $limit);
     $result = array();
     if ($log) {
         foreach ($log as $entry) {
             $additionalParams = !empty($entry['additionalParams']) ? json_decode($entry['additionalParams'], true) : null;
             $entry['action'] = $this->getActionTitle($entry['pluginKey'], $entry['actionKey'], $additionalParams);
             $result[$entry['id']] = $entry;
         }
     }
     return $result;
 }