admin: minor refactor

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/672/head
Varun Patil 2023-05-26 10:23:16 -07:00
parent 0532bc8ee3
commit f154e12804
1 changed files with 6 additions and 15 deletions

View File

@ -3,24 +3,15 @@
namespace OCA\Memories\Settings;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
use OCP\IL10N;
use OCP\Settings\ISettings;
class Admin implements ISettings
{
/** @var IConfig */
private $config;
protected $appName;
/** @var IL10N */
private $l;
public function __construct(
IConfig $config,
IL10N $l
) {
$this->config = $config;
$this->l = $l;
public function __construct(string $AppName)
{
$this->appName = $AppName;
}
/**
@ -28,14 +19,14 @@ class Admin implements ISettings
*/
public function getForm()
{
\OCP\Util::addScript('memories', 'memories-admin');
\OCP\Util::addScript($this->appName, 'memories-admin');
return new TemplateResponse('memories', 'main', []);
}
public function getSection()
{
return 'memories';
return $this->appName;
}
public function getPriority()