forked from mtierltd/timetracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPageController.php
More file actions
33 lines (25 loc) · 753 Bytes
/
PageController.php
File metadata and controls
33 lines (25 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace OCA\TimeTracker\Controller;
use OCP\IRequest;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Controller;
use OCP\IUserSession;
class PageController extends Controller {
/** @var IUserSession */
protected $userSession;
public function __construct($AppName, IRequest $request, IUserSession $userSession){
parent::__construct($AppName, $request);
$this->userSession = $userSession;
$user = $this->userSession->getUser();
//var_dump($user);
}
/**
*
* @NoAdminRequired
* @NoCSRFRequired
*/
public function index() {
return new TemplateResponse('timetracker', 'index',['appPage' => 'content/index', 'script' => 'timer']); // templates/index.php
}
}