add constante for the app id and the app name
This commit is contained in:
parent
78c95c58ff
commit
9a67c165bd
|
@ -33,12 +33,16 @@ class Application extends App
|
|||
*/
|
||||
protected $user;
|
||||
|
||||
public const APP_ID = 'side_menu';
|
||||
|
||||
public const APP_NAME = 'Side menu';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(array $urlParams = [])
|
||||
{
|
||||
parent::__construct('side_menu', $urlParams);
|
||||
parent::__construct(self::APP_ID, $urlParams);
|
||||
|
||||
$this->config = OC::$server->getConfig();
|
||||
$this->cspnm = OC::$server->getContentSecurityPolicyNonceManager();
|
||||
|
@ -53,7 +57,7 @@ class Application extends App
|
|||
$enabled = true;
|
||||
|
||||
if (null !== $this->user) {
|
||||
$enabled = (bool) $this->config->getUserValue($this->user->getUid(), 'side_menu', 'enabled', '1');
|
||||
$enabled = (bool) $this->config->getUserValue($this->user->getUid(), self::APP_ID, 'enabled', '1');
|
||||
}
|
||||
|
||||
return $enabled;
|
||||
|
@ -76,20 +80,20 @@ class Application extends App
|
|||
*/
|
||||
public function registerAssets()
|
||||
{
|
||||
Util::addScript('side_menu', 'sideMenu');
|
||||
Util::addStyle('side_menu', 'sideMenu');
|
||||
Util::addScript(self::APP_ID, 'sideMenu');
|
||||
Util::addStyle(self::APP_ID, 'sideMenu');
|
||||
|
||||
$stylesheet = OC::$server->getURLGenerator()->linkToRoute(
|
||||
'side_menu.Css.stylesheet',
|
||||
[
|
||||
'v' => $this->config->getAppValue('side_menu', 'cache', '0'),
|
||||
'v' => $this->config->getAppValue(self::APP_ID, 'cache', '0'),
|
||||
]
|
||||
);
|
||||
|
||||
$script = OC::$server->getURLGenerator()->linkToRoute(
|
||||
'side_menu.Js.script',
|
||||
[
|
||||
'v' => $this->config->getAppValue('side_menu', 'cache', '0'),
|
||||
'v' => $this->config->getAppValue(self::APP_ID, 'cache', '0'),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ use OCP\AppFramework\Http\TemplateResponse;
|
|||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
use OCP\IUserSession;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class CssController extends Controller
|
||||
{
|
||||
|
@ -61,7 +62,7 @@ class CssController extends Controller
|
|||
*/
|
||||
public function stylesheet()
|
||||
{
|
||||
$response = new TemplateResponse('side_menu', 'css/stylesheet', $this->getConfig(), 'blank');
|
||||
$response = new TemplateResponse(Application::APP_ID, 'css/stylesheet', $this->getConfig(), 'blank');
|
||||
$response->addHeader('Content-Type', 'text/css');
|
||||
|
||||
return $response;
|
||||
|
@ -69,13 +70,13 @@ class CssController extends Controller
|
|||
|
||||
protected function getConfig(): array
|
||||
{
|
||||
$backgroundColor = $this->config->getAppValue('side_menu', 'background-color', '#333333');
|
||||
$backgroundColorTo = $this->config->getAppValue('side_menu', 'background-color-to', $backgroundColor);
|
||||
$backgroundColor = $this->config->getAppValue(Application::APP_ID, 'background-color', '#333333');
|
||||
$backgroundColorTo = $this->config->getAppValue(Application::APP_ID, 'background-color-to', $backgroundColor);
|
||||
|
||||
$topMenuApps = (array) json_decode($this->config->getAppValue('side_menu', 'top-menu-apps', '[]'), true);
|
||||
$topMenuApps = (array) json_decode($this->config->getAppValue(Application::APP_ID, 'top-menu-apps', '[]'), true);
|
||||
|
||||
if ($this->user) {
|
||||
$userTopMenuApps = (array) json_decode($this->config->getUserValue($this->user->getUid(), 'side_menu', 'top-menu-apps', '[]'), true);
|
||||
$userTopMenuApps = (array) json_decode($this->config->getUserValue($this->user->getUid(), Application::APP_ID, 'top-menu-apps', '[]'), true);
|
||||
|
||||
if (!empty($userTopMenuApps)) {
|
||||
$topMenuApps = $userTopMenuApps;
|
||||
|
@ -86,20 +87,20 @@ class CssController extends Controller
|
|||
'vars' => [
|
||||
'background-color' => $backgroundColor,
|
||||
'background-color-to' => $backgroundColorTo,
|
||||
'current-app-background-color' => $this->config->getAppValue('side_menu', 'current-app-background-color', '#444444'),
|
||||
'loader-color' => $this->config->getAppValue('side_menu', 'loader-color', '#0e75ac'),
|
||||
'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'),
|
||||
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
||||
'icon-invert-filter' => abs((int) $this->config->getAppValue('side_menu', 'icon-invert-filter', '0')).'%',
|
||||
'icon-opacity' => abs((int) $this->config->getAppValue('side_menu', 'icon-opacity', '100') / 100),
|
||||
'current-app-background-color' => $this->config->getAppValue(Application::APP_ID, 'current-app-background-color', '#444444'),
|
||||
'loader-color' => $this->config->getAppValue(Application::APP_ID, 'loader-color', '#0e75ac'),
|
||||
'text-color' => $this->config->getAppValue(Application::APP_ID, 'text-color', '#FFFFFF'),
|
||||
'opener' => $this->config->getAppValue(Application::APP_ID, 'opener', 'side-menu-opener'),
|
||||
'icon-invert-filter' => abs((int) $this->config->getAppValue(Application::APP_ID, 'icon-invert-filter', '0')).'%',
|
||||
'icon-opacity' => abs((int) $this->config->getAppValue(Application::APP_ID, 'icon-opacity', '100') / 100),
|
||||
],
|
||||
'display-logo' => (bool) $this->config->getAppValue('side_menu', 'display-logo', 1),
|
||||
'opener-only' => (bool) $this->config->getAppValue('side_menu', 'opener-only', 0),
|
||||
'external-sites-in-top-menu' => (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0),
|
||||
'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'),
|
||||
'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'),
|
||||
'always-displayed' => (bool) $this->config->getAppValue('side_menu', 'always-displayed', '0'),
|
||||
'big-menu' => (bool) $this->config->getAppValue('side_menu', 'big-menu', '0'),
|
||||
'display-logo' => (bool) $this->config->getAppValue(Application::APP_ID, 'display-logo', 1),
|
||||
'opener-only' => (bool) $this->config->getAppValue(Application::APP_ID, 'opener-only', 0),
|
||||
'external-sites-in-top-menu' => (bool) $this->config->getAppValue(Application::APP_ID, 'external-sites-in-top-menu', 0),
|
||||
'size-icon' => $this->config->getAppValue(Application::APP_ID, 'size-icon', 'normal'),
|
||||
'size-text' => $this->config->getAppValue(Application::APP_ID, 'size-text', 'normal'),
|
||||
'always-displayed' => (bool) $this->config->getAppValue(Application::APP_ID, 'always-displayed', '0'),
|
||||
'big-menu' => (bool) $this->config->getAppValue(Application::APP_ID, 'big-menu', '0'),
|
||||
'top-menu-apps' => $topMenuApps,
|
||||
];
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ use OCP\AppFramework\Http\TemplateResponse;
|
|||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
use OCP\IUserSession;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class JsController extends Controller
|
||||
{
|
||||
|
@ -68,7 +69,7 @@ class JsController extends Controller
|
|||
*/
|
||||
public function script(): TemplateResponse
|
||||
{
|
||||
$response = new TemplateResponse('side_menu', 'js/script', $this->getConfig(), 'blank');
|
||||
$response = new TemplateResponse(Application::APP_ID, 'js/script', $this->getConfig(), 'blank');
|
||||
$response->addHeader('Content-Type', 'text/javascript');
|
||||
|
||||
return $response;
|
||||
|
@ -86,20 +87,20 @@ class JsController extends Controller
|
|||
|
||||
protected function getConfig(): array
|
||||
{
|
||||
$topMenuApps = (array) json_decode($this->config->getAppValue('side_menu', 'top-menu-apps', '[]'), true);
|
||||
$targetBlankApps = (array) json_decode($this->config->getAppValue('side_menu', 'target-blank-apps', '[]'), true);
|
||||
$useAvatar = (bool) $this->config->getAppValue('side_menu', 'use-avatar', '0');
|
||||
$topMenuApps = (array) json_decode($this->config->getAppValue(Application::APP_ID, 'top-menu-apps', '[]'), true);
|
||||
$targetBlankApps = (array) json_decode($this->config->getAppValue(Application::APP_ID, 'target-blank-apps', '[]'), true);
|
||||
$useAvatar = (bool) $this->config->getAppValue(Application::APP_ID, 'use-avatar', '0');
|
||||
$avatar = null;
|
||||
|
||||
if ($this->user) {
|
||||
$userTopMenuApps = (array) json_decode($this->config->getUserValue($this->user->getUid(), 'side_menu', 'top-menu-apps', '[]'), true);
|
||||
$userTopMenuApps = (array) json_decode($this->config->getUserValue($this->user->getUid(), Application::APP_ID, 'top-menu-apps', '[]'), true);
|
||||
|
||||
if (!empty($userTopMenuApps)) {
|
||||
$topMenuApps = $userTopMenuApps;
|
||||
}
|
||||
|
||||
$userTargetBlankMode = (int) $this->config->getUserValue($this->user->getUid(), 'side_menu', 'target-blank-mode', '1');
|
||||
$userTargetBlankApps = (array) json_decode($this->config->getUserValue($this->user->getUid(), 'side_menu', 'target-blank-apps', '[]'), true);
|
||||
$userTargetBlankMode = (int) $this->config->getUserValue($this->user->getUid(), Application::APP_ID, 'target-blank-mode', '1');
|
||||
$userTargetBlankApps = (array) json_decode($this->config->getUserValue($this->user->getUid(), Application::APP_ID, 'target-blank-apps', '[]'), true);
|
||||
|
||||
if (2 === $userTargetBlankMode) {
|
||||
$targetBlankApps = $userTargetBlankApps;
|
||||
|
@ -119,14 +120,14 @@ class JsController extends Controller
|
|||
}
|
||||
|
||||
return [
|
||||
'opener-position' => $this->config->getAppValue('side_menu', 'opener-position', 'before'),
|
||||
'opener-hover' => (bool) $this->config->getAppValue('side_menu', 'opener-hover', '0'),
|
||||
'external-sites-in-top-menu' => (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0),
|
||||
'force-light-icon' => (bool) $this->config->getAppValue('side_menu', 'force-light-icon', '0'),
|
||||
'hide-when-no-apps' => (bool) $this->config->getAppValue('side_menu', 'hide-when-no-apps', '0'),
|
||||
'loader-enabled' => (bool) $this->config->getAppValue('side_menu', 'loader-enabled', '1'),
|
||||
'always-displayed' => (bool) $this->config->getAppValue('side_menu', 'always-displayed', '0'),
|
||||
'big-menu' => (bool) $this->config->getAppValue('side_menu', 'big-menu', '0'),
|
||||
'opener-position' => $this->config->getAppValue(Application::APP_ID, 'opener-position', 'before'),
|
||||
'opener-hover' => (bool) $this->config->getAppValue(Application::APP_ID, 'opener-hover', '0'),
|
||||
'external-sites-in-top-menu' => (bool) $this->config->getAppValue(Application::APP_ID, 'external-sites-in-top-menu', 0),
|
||||
'force-light-icon' => (bool) $this->config->getAppValue(Application::APP_ID, 'force-light-icon', '0'),
|
||||
'hide-when-no-apps' => (bool) $this->config->getAppValue(Application::APP_ID, 'hide-when-no-apps', '0'),
|
||||
'loader-enabled' => (bool) $this->config->getAppValue(Application::APP_ID, 'loader-enabled', '1'),
|
||||
'always-displayed' => (bool) $this->config->getAppValue(Application::APP_ID, 'always-displayed', '0'),
|
||||
'big-menu' => (bool) $this->config->getAppValue(Application::APP_ID, 'big-menu', '0'),
|
||||
'avatar' => $avatar,
|
||||
'top-menu-apps' => $topMenuApps,
|
||||
'target-blank-apps' => $targetBlankApps,
|
||||
|
|
|
@ -29,6 +29,7 @@ use OCP\IL10N;
|
|||
use OCP\IRequest;
|
||||
use OCP\IUserSession;
|
||||
use OCP\L10N\IFactory;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class NavController extends Controller
|
||||
{
|
||||
|
@ -98,7 +99,7 @@ class NavController extends Controller
|
|||
$apps = $this->appRepository->getVisibleApps();
|
||||
$currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2);
|
||||
$categoriesLabels = $this->categoryFetcher->get();
|
||||
$externalSitesInTopMenu = (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0);
|
||||
$externalSitesInTopMenu = (bool) $this->config->getAppValue(Application::APP_ID, 'external-sites-in-top-menu', 0);
|
||||
$user = OC::$server[IUserSession::class]->getUser();
|
||||
$appsCategories = [];
|
||||
$categoriesAppsCount = [];
|
||||
|
@ -110,8 +111,8 @@ class NavController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
$topMenuApps = (array) json_decode($this->config->getAppValue('side_menu', 'top-menu-apps', '[]'), true);
|
||||
$userTopMenuApps = (array) json_decode($this->config->getUserValue($user->getUid(), 'side_menu', 'top-menu-apps', '[]'), true);
|
||||
$topMenuApps = (array) json_decode($this->config->getAppValue(Application::APP_ID, 'top-menu-apps', '[]'), true);
|
||||
$userTopMenuApps = (array) json_decode($this->config->getUserValue($user->getUid(), Application::APP_ID, 'top-menu-apps', '[]'), true);
|
||||
|
||||
if (!empty($userTopMenuApps)) {
|
||||
$topMenuApps = $userTopMenuApps;
|
||||
|
|
|
@ -23,6 +23,7 @@ use OCP\AppFramework\Http\Response;
|
|||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
use OCP\IUserSession;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class PersonalSettingController extends Controller
|
||||
{
|
||||
|
@ -104,7 +105,7 @@ class PersonalSettingController extends Controller
|
|||
}
|
||||
|
||||
if ($doSave) {
|
||||
$this->config->setUserValue($user->getUid(), 'side_menu', $name, $value);
|
||||
$this->config->setUserValue($user->getUid(), Application::APP_ID, $name, $value);
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
|
|
|
@ -24,6 +24,7 @@ use OCP\IConfig;
|
|||
use OCP\IL10N;
|
||||
use OCP\ILogger;
|
||||
use OCP\Settings\ISettings;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class Admin implements ISettings
|
||||
{
|
||||
|
@ -60,36 +61,36 @@ class Admin implements ISettings
|
|||
*/
|
||||
public function getForm()
|
||||
{
|
||||
$backgroundColor = $this->config->getAppValue('side_menu', 'background-color', '#333333');
|
||||
$backgroundColorTo = $this->config->getAppValue('side_menu', 'background-color-to', $backgroundColor);
|
||||
$backgroundColor = $this->config->getAppValue(Application::APP_ID, 'background-color', '#333333');
|
||||
$backgroundColorTo = $this->config->getAppValue(Application::APP_ID, 'background-color-to', $backgroundColor);
|
||||
|
||||
$parameters = [
|
||||
'background-color' => $backgroundColor,
|
||||
'background-color-to' => $backgroundColorTo,
|
||||
'current-app-background-color' => $this->config->getAppValue('side_menu', 'current-app-background-color', '#444444'),
|
||||
'loader-color' => $this->config->getAppValue('side_menu', 'loader-color', '#0e75ac'),
|
||||
'icon-invert-filter' => (int) $this->config->getAppValue('side_menu', 'icon-invert-filter', '0'),
|
||||
'icon-opacity' => (int) $this->config->getAppValue('side_menu', 'icon-opacity', '100'),
|
||||
'loader-enabled' => $this->config->getAppValue('side_menu', 'loader-enabled', '1'),
|
||||
'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'),
|
||||
'cache' => $this->config->getAppValue('side_menu', 'cache', '0'),
|
||||
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
||||
'always-displayed' => $this->config->getAppValue('side_menu', 'always-displayed', '0'),
|
||||
'big-menu' => $this->config->getAppValue('side_menu', 'big-menu', '0'),
|
||||
'display-logo' => $this->config->getAppValue('side_menu', 'display-logo', '1'),
|
||||
'use-avatar' => $this->config->getAppValue('side_menu', 'use-avatar', '0'),
|
||||
'opener-position' => $this->config->getAppValue('side_menu', 'opener-position', 'before'),
|
||||
'opener-hover' => $this->config->getAppValue('side_menu', 'opener-hover', '0'),
|
||||
'opener-only' => $this->config->getAppValue('side_menu', 'opener-only', '0'),
|
||||
'hide-when-no-apps' => $this->config->getAppValue('side_menu', 'hide-when-no-apps', '0'),
|
||||
'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'),
|
||||
'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'),
|
||||
'target-blank-apps' => (array) json_decode($this->config->getAppValue('side_menu', 'target-blank-apps', '[]'), true),
|
||||
'top-menu-apps' => (array) json_decode($this->config->getAppValue('side_menu', 'top-menu-apps', '[]'), true),
|
||||
'current-app-background-color' => $this->config->getAppValue(Application::APP_ID, 'current-app-background-color', '#444444'),
|
||||
'loader-color' => $this->config->getAppValue(Application::APP_ID, 'loader-color', '#0e75ac'),
|
||||
'icon-invert-filter' => (int) $this->config->getAppValue(Application::APP_ID, 'icon-invert-filter', '0'),
|
||||
'icon-opacity' => (int) $this->config->getAppValue(Application::APP_ID, 'icon-opacity', '100'),
|
||||
'loader-enabled' => $this->config->getAppValue(Application::APP_ID, 'loader-enabled', '1'),
|
||||
'text-color' => $this->config->getAppValue(Application::APP_ID, 'text-color', '#FFFFFF'),
|
||||
'cache' => $this->config->getAppValue(Application::APP_ID, 'cache', '0'),
|
||||
'opener' => $this->config->getAppValue(Application::APP_ID, 'opener', 'side-menu-opener'),
|
||||
'always-displayed' => $this->config->getAppValue(Application::APP_ID, 'always-displayed', '0'),
|
||||
'big-menu' => $this->config->getAppValue(Application::APP_ID, 'big-menu', '0'),
|
||||
'display-logo' => $this->config->getAppValue(Application::APP_ID, 'display-logo', '1'),
|
||||
'use-avatar' => $this->config->getAppValue(Application::APP_ID, 'use-avatar', '0'),
|
||||
'opener-position' => $this->config->getAppValue(Application::APP_ID, 'opener-position', 'before'),
|
||||
'opener-hover' => $this->config->getAppValue(Application::APP_ID, 'opener-hover', '0'),
|
||||
'opener-only' => $this->config->getAppValue(Application::APP_ID, 'opener-only', '0'),
|
||||
'hide-when-no-apps' => $this->config->getAppValue(Application::APP_ID, 'hide-when-no-apps', '0'),
|
||||
'size-icon' => $this->config->getAppValue(Application::APP_ID, 'size-icon', 'normal'),
|
||||
'size-text' => $this->config->getAppValue(Application::APP_ID, 'size-text', 'normal'),
|
||||
'target-blank-apps' => (array) json_decode($this->config->getAppValue(Application::APP_ID, 'target-blank-apps', '[]'), true),
|
||||
'top-menu-apps' => (array) json_decode($this->config->getAppValue(Application::APP_ID, 'top-menu-apps', '[]'), true),
|
||||
'apps' => $this->appRepository->getVisibleApps(),
|
||||
];
|
||||
|
||||
return new TemplateResponse('side_menu', 'settings/admin-form', $parameters, '');
|
||||
return new TemplateResponse(Application::APP_ID, 'settings/admin-form', $parameters, '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -97,7 +98,7 @@ class Admin implements ISettings
|
|||
*/
|
||||
public function getSection()
|
||||
{
|
||||
return 'side_menu';
|
||||
return Application::APP_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace OCA\SideMenu\Settings;
|
|||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Settings\IIconSection;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class AdminSection implements IIconSection
|
||||
{
|
||||
|
@ -52,7 +53,7 @@ class AdminSection implements IIconSection
|
|||
*/
|
||||
public function getID()
|
||||
{
|
||||
return 'side_menu';
|
||||
return Application::APP_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,7 +64,7 @@ class AdminSection implements IIconSection
|
|||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->l->t('Side menu');
|
||||
return $this->l->t(Application::APP_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,6 +25,7 @@ use OCP\Settings\ISettings;
|
|||
use OCP\IConfig;
|
||||
use OCP\IUserSession;
|
||||
use OCA\SideMenu\Service\AppRepository;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class Personal implements ISettings
|
||||
{
|
||||
|
@ -70,14 +71,14 @@ class Personal implements ISettings
|
|||
$user = $this->userSession->getUser();
|
||||
|
||||
$parameters = [
|
||||
'enabled' => $this->config->getUserValue($user->getUid(), 'side_menu', 'enabled', '1'),
|
||||
'top-menu-apps' => (array) json_decode($this->config->getUserValue($user->getUid(), 'side_menu', 'top-menu-apps', '[]'), true),
|
||||
'target-blank-mode' => $this->config->getUserValue($user->getUid(), 'side_menu', 'target-blank-mode', '1'),
|
||||
'target-blank-apps' => (array) json_decode($this->config->getUserValue($user->getUid(), 'side_menu', 'target-blank-apps', '[]'), true),
|
||||
'enabled' => $this->config->getUserValue($user->getUid(), Application::APP_ID, 'enabled', '1'),
|
||||
'top-menu-apps' => (array) json_decode($this->config->getUserValue($user->getUid(), Application::APP_ID, 'top-menu-apps', '[]'), true),
|
||||
'target-blank-mode' => $this->config->getUserValue($user->getUid(), Application::APP_ID, 'target-blank-mode', '1'),
|
||||
'target-blank-apps' => (array) json_decode($this->config->getUserValue($user->getUid(), Application::APP_ID, 'target-blank-apps', '[]'), true),
|
||||
'apps' => $this->appRepository->getVisibleApps(),
|
||||
];
|
||||
|
||||
return new TemplateResponse('side_menu', 'settings/personal-form', $parameters, '');
|
||||
return new TemplateResponse(Application::APP_ID, 'settings/personal-form', $parameters, '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +86,7 @@ class Personal implements ISettings
|
|||
*/
|
||||
public function getSection()
|
||||
{
|
||||
return 'side_menu';
|
||||
return Application::APP_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace OCA\SideMenu\Settings;
|
|||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Settings\IIconSection;
|
||||
use OCA\SideMenu\AppInfo\Application;
|
||||
|
||||
class PersonalSection implements IIconSection
|
||||
{
|
||||
|
@ -52,7 +53,7 @@ class PersonalSection implements IIconSection
|
|||
*/
|
||||
public function getID()
|
||||
{
|
||||
return 'side_menu';
|
||||
return Application::APP_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,7 +64,7 @@ class PersonalSection implements IIconSection
|
|||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->l->t('Side menu');
|
||||
return $this->l->t(Application::APP_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue