public function render() { $this->template->job = $this->dataTransferManager->createQuery(JobDto::class, function () { return $this->jobRepository->find($this->id); })->enableCache()->fetch(); $this->template->render(); }
public function render() { $this->template->notifications = $this->dataTransferManager->createQuery(NotificationDto::class, function () { return $this->notificationManager->getNotifications(5, $this->offset); })->enableCache($this->offset)->fetchAll(); $this->template->notificationCount = $this->notificationManager->countNotifications(); $this->template->offset = $this->offset + 5; $this->template->render(); }
public function render() { if ($this->id !== null) { $this->template->notification = $this->dataTransferManager->createQuery(NotificationDto::class, function () { return $this->notificationUserRepository->find($this->id); })->enableCache()->fetch(); } $this->template->render(); }
public function renderDefault() { $this->template->userDto = $this->dataTransferManager->createQuery(UserDto::class, function () { return $this->userRepository->find($this->getUser()->getIdentity()->getId()); })->enableCache(sprintf('#%s', $this->getUser()->getIdentity()->getId()))->fetch(); }