public function removeActivity(OW_Event $e) { $params = $e->getParams(); if (isset($params['activityKey'])) { $activityKey = $params['activityKey']; } else { $keyData = array(); foreach (array('activityType', 'activityId', 'entityType', 'entityId', 'userId') as $item) { $keyData[$item] = empty($params[$item]) ? '*' : $params[$item]; } $actionKey = empty($params['actionUniqId']) ? $keyData['entityType'] . '.' . $keyData['entityId'] : $params['actionUniqId']; $_activityKey = empty($params['activityUniqId']) ? $keyData['activityType'] . '.' . $keyData['activityId'] : $params['activityUniqId']; $activityKey = "{$_activityKey}:{$actionKey}:{$keyData['userId']}"; } $this->service->removeActivity($activityKey); }