Example #1
0
 public function render()
 {
     $this->template->job = $this->dataTransferManager->createQuery(JobDto::class, function () {
         return $this->jobRepository->find($this->id);
     })->enableCache()->fetch();
     $this->template->render();
 }
Example #2
0
 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();
 }
Example #3
0
 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();
 }
 /**
  * @return \Venne\DataTransfer\DataTransferObject[]
  */
 public function fetchAll()
 {
     return $this->manager->fetchIterator($this);
 }
Example #5
0
 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();
 }