Пример #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();
 }
Пример #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();
 }
Пример #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();
 }
Пример #4
0
 /**
  * @return \Venne\DataTransfer\DataTransferObject[]
  */
 public function fetchAll()
 {
     return $this->manager->fetchIterator($this);
 }
Пример #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();
 }