nextcloud-app-radio/lib/Controller/PageController.php

32 lines
632 B
PHP
Raw Normal View History

2020-10-12 15:29:36 +00:00
<?php
declare(strict_types=1);
namespace OCA\Radio\Controller;
use OCP\IRequest;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Controller;
use OCP\Util;
class PageController extends Controller {
protected $appName;
public function __construct($appName, IRequest $request) {
parent::__construct($appName, $request);
$this->appName = $appName;
}
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function index() {
Util::addScript($this->appName, 'radio-main');
Util::addStyle($this->appName, 'icons');
$response = new TemplateResponse($this->appName, 'main');
return $response;
}
}