2016-11-16 12:46:32 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright 2016, Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
*
|
2019-12-03 21:57:53 +03:00
|
|
|
* @author Julius Härtl <jus@bitgrid.net>
|
2016-11-16 12:46:32 +03:00
|
|
|
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
*
|
|
|
|
* @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
|
2018-06-27 20:59:17 +03:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2016-11-16 12:46:32 +03:00
|
|
|
*
|
|
|
|
*/
|
2019-11-22 22:52:10 +03:00
|
|
|
|
2020-01-30 15:30:45 +03:00
|
|
|
namespace OCA\Settings\Settings\Personal;
|
2016-11-16 12:46:32 +03:00
|
|
|
|
|
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
|
|
use OCP\Settings\ISettings;
|
2020-03-06 15:08:23 +03:00
|
|
|
use OCP\Support\Subscription\IRegistry;
|
2016-11-16 12:46:32 +03:00
|
|
|
|
|
|
|
class ServerDevNotice implements ISettings {
|
2020-03-06 15:08:23 +03:00
|
|
|
|
|
|
|
/** @var IRegistry */
|
|
|
|
private $registry;
|
|
|
|
|
|
|
|
public function __construct(IRegistry $registry) {
|
|
|
|
$this->registry = $registry;
|
|
|
|
}
|
|
|
|
|
2016-11-16 12:46:32 +03:00
|
|
|
/**
|
|
|
|
* @return TemplateResponse
|
|
|
|
*/
|
|
|
|
public function getForm() {
|
2018-06-27 20:59:17 +03:00
|
|
|
return new TemplateResponse('settings', 'settings/personal/development.notice');
|
2016-11-16 12:46:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string the section ID, e.g. 'sharing'
|
|
|
|
*/
|
|
|
|
public function getSection() {
|
2020-03-06 15:08:23 +03:00
|
|
|
if ($this->registry->delegateHasValidSubscription()) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2018-06-27 20:59:17 +03:00
|
|
|
return 'personal-info';
|
2016-11-16 12:46:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int whether the form should be rather on the top or bottom of
|
|
|
|
* the admin section. The forms are arranged in ascending order of the
|
|
|
|
* priority values. It is required to return a value between 0 and 100.
|
|
|
|
*
|
|
|
|
* E.g.: 70
|
|
|
|
*/
|
|
|
|
public function getPriority() {
|
|
|
|
return 1000;
|
|
|
|
}
|
|
|
|
}
|