2023-04-10 06:24:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OCA\Memories\Settings;
|
|
|
|
|
2023-05-28 16:59:34 +00:00
|
|
|
use OCA\Memories\Controller\PageController;
|
2023-04-10 06:24:59 +00:00
|
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
|
|
use OCP\Settings\ISettings;
|
|
|
|
|
|
|
|
class Admin implements ISettings
|
|
|
|
{
|
2023-05-26 17:23:16 +00:00
|
|
|
protected $appName;
|
|
|
|
|
|
|
|
public function __construct(string $AppName)
|
|
|
|
{
|
|
|
|
$this->appName = $AppName;
|
2023-04-10 06:24:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return TemplateResponse
|
|
|
|
*/
|
|
|
|
public function getForm()
|
|
|
|
{
|
2023-05-26 17:23:16 +00:00
|
|
|
\OCP\Util::addScript($this->appName, 'memories-admin');
|
2023-04-10 06:24:59 +00:00
|
|
|
|
2023-05-28 16:59:34 +00:00
|
|
|
return new TemplateResponse('memories', 'main', PageController::getMainParams());
|
2023-04-10 06:24:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getSection()
|
|
|
|
{
|
2023-05-26 17:23:16 +00:00
|
|
|
return $this->appName;
|
2023-04-10 06:24:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getPriority()
|
|
|
|
{
|
|
|
|
return 50;
|
|
|
|
}
|
|
|
|
}
|