user->id; $offset = intval($request->get('offset')); $maxSize = intval($request->get('maxSize')); $after = $request->get('after'); if (empty($maxSize)) { $maxSize = self::MAX_SIZE_LIMIT; } $params = [ 'offset' => $offset, 'maxSize' => $maxSize, 'after' => $after, ]; $recordCollection = $this->getService('Notification')->getList($userId, $params); return (object) [ 'total' => $recordCollection->getTotal(), 'list' => $recordCollection->getValueMapList(), ]; } public function getActionNotReadCount(): int { $userId = $this->user->getId(); return $this->getService('Notification')->getNotReadCount($userId); } public function postActionMarkAllRead(Request $request): bool { $userId = $this->user->getId(); $this->getService('Notification')->markAllRead($userId); return true; } public function beforeExport(): void { throw new Error(); } }