user->getId(); $searchParams = $this->searchParamsFetcher->fetch($request); $offset = $searchParams->getOffset(); $maxSize = $searchParams->getMaxSize(); $after = $request->get('after'); $params = [ 'offset' => $offset, 'maxSize' => $maxSize, 'after' => $after, ]; $recordCollection = $this->recordServiceContainer ->get('Notification') ->getList($userId, $params); return (object) [ 'total' => $recordCollection->getTotal(), 'list' => $recordCollection->getValueMapList(), ]; } public function getActionNotReadCount(): int { $userId = $this->user->getId(); return $this->recordServiceContainer->get('Notification')->getNotReadCount($userId); } public function postActionMarkAllRead(Request $request): bool { $userId = $this->user->getId(); $this->recordServiceContainer->get('Notification')->markAllRead($userId); return true; } }