Completed
Push — master ( eb2d41...ad11c2 )
by Raimund
13s
created

PageController::addJavaScriptVariablesForIndex()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
/**
3
 * Nextcloud - Tasks
4
 *
5
 * @author Raimund Schlüßler
6
 * @copyright 2019 Raimund Schlüßler <[email protected]>
7
 *
8
 * This library is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
 * License as published by the Free Software Foundation; either
11
 * version 3 of the License, or any later version.
12
 *
13
 * This library is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public
19
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
20
 *
21
 */
22
23
namespace OCA\Tasks\Controller;
24
25
use \OCP\AppFramework\Controller;
26
use \OCP\AppFramework\Http\TemplateResponse;
27
use \OCP\IRequest;
28
use \OCP\IUserSession;
29
30
/**
31
 * Controller class for main page.
32
 */
33
class PageController extends Controller {
34
35
	/**
36
	 * @var IUserSession
37
	 */
38
	private $userSession;
39
40
	/**
41
	 * @param string $appName
42
	 * @param IRequest $request an instance of the request
43
	 * @param IUserSession $userSession
44
	 */
45
	public function __construct(string $appName, IRequest $request, IUserSession $userSession) {
46
		parent::__construct($appName, $request);
47
		$this->userSession = $userSession;
48
	}
49
50
51
	/**
52
	 * @NoAdminRequired
53
	 * @NoCSRFRequired
54
	 *
55
	 * @return TemplateResponse
56
	 */
57
	public function index():TemplateResponse {
58
		return new TemplateResponse('tasks', 'main');
59
	}
60
}
61