idNextcloud = $UserId; $this->myDb = $myDb; $this->urlGenerator = $urlGenerator; $this->mailer = $mailer; $this->config = $config; $this->orderService = $orderService; $this->navigationService = $navigationService; //$this->fpdf = $fpdf; if ($userSession->isLoggedIn()) { $this->user = $userSession->getUser(); } if ($this->user != null) { $groups = $groupManager->getUserGroups($this->user); $this->groups = []; foreach ($groups as $group) { $this->groups[] = $group->getGID(); } } try{ $this->storage = $rootFolder->getUserFolder($this->idNextcloud); }catch(\OC\User\NoUserException $e){ } } /** * @NoAdminRequired * @NoCSRFRequired */ public function orders() { return new TemplateResponse('gestion', 'orders', array('groups' => $this->groups, 'user' => $this->user, 'path' => $this->idNextcloud, 'url' => $this->navigationService->getNavigationLink())); } /** * @NoAdminRequired * @NoCSRFRequired */ public function getOrders() { $orders = $this->orderService->getOrdersWithDetailsAsArray(); return json_encode($orders); } }