forked from dehnhardt/nc_dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutepagecontroller.php
executable file
·47 lines (38 loc) · 1.11 KB
/
routepagecontroller.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* ownCloud - dashboard
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Florian Steffens <webmaster@freans.de>
* @copyright Florian Steffens 2014
*/
namespace OCA\Dashboard\Controller;
use OCA\Dashboard\Services\WidgetCssAndJsService;
use \OCP\IRequest;
use \OCP\AppFramework\Http\TemplateResponse;
use \OCP\AppFramework\Controller;
class RoutePageController extends Controller {
private $user;
private $widgetCssAndJsService;
public function __construct($appName, IRequest $request, $user, WidgetCssAndJsService $widgetCssAndJsService){
parent::__construct($appName, $request);
$this->user = $user;
$this->widgetCssAndJsService = $widgetCssAndJsService;
}
/**
*
* main index
*
* @NoAdminRequired
* @NoCSRFRequired
*/
public function index() {
$this->widgetCssAndJsService->loadAll();
$params = array(
'user' => $this->user,
);
return new TemplateResponse('dashboard', 'main', $params);
}
}