PageController.php 928 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace OCA\Static\Controller;
  3. use OCP\IRequest;
  4. use OCP\AppFramework\Http\TemplateResponse;
  5. use OCP\AppFramework\Http\DataResponse;
  6. use OCP\AppFramework\Controller;
  7. class PageController extends Controller {
  8. private $userId;
  9. public function __construct($AppName, IRequest $request, $UserId){
  10. parent::__construct($AppName, $request);
  11. $this->userId = $UserId;
  12. }
  13. /**
  14. * CAUTION: the @Stuff turns off security checks; for this page no admin is
  15. * required and no CSRF check. If you don't know what CSRF is, read
  16. * it up in the docs or you might create a security hole. This is
  17. * basically the only required method to add this exemption, don't
  18. * add it to any other method if you don't exactly know what it does
  19. *
  20. * @NoAdminRequired
  21. * @NoCSRFRequired
  22. */
  23. public function index() {
  24. return new TemplateResponse('static', 'index'); // templates/index.php
  25. }
  26. }