1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-05-10 19:34:06 +02:00
Nextcloud-News/lib/Settings/Admin.php
2018-12-14 07:54:43 +01:00

44 lines
1.0 KiB
PHP

<?php
namespace OCA\News\Settings;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\Settings\ISettings;
use OCA\News\Config\Config;
class Admin implements ISettings
{
private $config;
public function __construct(Config $config)
{
$this->config = $config;
}
public function getForm()
{
$data = [
'autoPurgeMinimumInterval' =>
$this->config->getAutoPurgeMinimumInterval(),
'autoPurgeCount' => $this->config->getAutoPurgeCount(),
'maxRedirects' => $this->config->getMaxRedirects(),
'feedFetcherTimeout' => $this->config->getFeedFetcherTimeout(),
'useCronUpdates' => $this->config->getUseCronUpdates(),
'maxSize' => $this->config->getMaxSize(),
'exploreUrl' => $this->config->getExploreUrl(),
];
return new TemplateResponse('news', 'admin', $data, '');
}
public function getSection()
{
return 'news';
}
public function getPriority()
{
return 40;
}
}