Browse Source
Move personal settings template generation to controller.
Move personal settings template generation to controller.
Signed-off-by: Joachim Bauch <bauch@struktur.de>pull/84/head
committed by
Morris Jobke
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
3 changed files with 74 additions and 9 deletions
@ -0,0 +1,36 @@ |
|||
<?php |
|||
/** |
|||
* @author Joachim Bauch <mail@joachim-bauch.de> |
|||
* |
|||
* @license GNU AGPL version 3 or any later version |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Affero General Public License as |
|||
* published by the Free Software Foundation, either version 3 of the |
|||
* License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Affero General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Affero General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
*/ |
|||
|
|||
namespace OCA\Spreed\AppInfo; |
|||
|
|||
use OCP\AppFramework\App; |
|||
use OCA\Spreed\Controller\PersonalSettingsController; |
|||
|
|||
class Application extends App { |
|||
|
|||
public function __construct () { |
|||
parent::__construct('spreed'); |
|||
$container = $this->getContainer(); |
|||
|
|||
$container->registerAlias('PersonalSettingsController', PersonalSettingsController::class); |
|||
} |
|||
|
|||
} |
|||
@ -1,11 +1,25 @@ |
|||
<?php |
|||
/** |
|||
* @author Joachim Bauch <mail@joachim-bauch.de> |
|||
* |
|||
* @license GNU AGPL version 3 or any later version |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Affero General Public License as |
|||
* published by the Free Software Foundation, either version 3 of the |
|||
* License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Affero General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Affero General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
*/ |
|||
|
|||
use OCA\Spreed\Util; |
|||
|
|||
$tmpl = new OCP\Template('spreed', 'settings-personal'); |
|||
$config = \OC::$server->getConfig(); |
|||
$uid = \OC::$server->getUserSession()->getUser()->getUID(); |
|||
|
|||
$settings = Util::getTurnSettings($config, $uid); |
|||
$tmpl->assign('turnSettings', $settings); |
|||
return $tmpl->fetchPage(); |
|||
$app = new \OCA\Spreed\AppInfo\Application(); |
|||
/** @var OCA\Spreed\Controller\PersonalSettingsController */ |
|||
$controller = $app->getContainer()->query('PersonalSettingsController'); |
|||
return $controller->displayPanel()->render(); |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue