Skip to content

Commit 3eaa0bc

Browse files
tomwezepoelDeepDiver1975
authored andcommitted
Add Menu Icon
1 parent d6ef7ef commit 3eaa0bc

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

appinfo/app.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,26 @@
3030
\OCP\Util::addStyle('customgroups', 'icon');
3131
}
3232
}
33+
34+
\OC::$server->getNavigationManager()->add(function () {
35+
$urlGenerator = \OC::$server->getURLGenerator();
36+
return [
37+
// the string under which your app will be referenced in owncloud
38+
'id' => 'customgroups',
39+
40+
// sorting weight for the navigation. The higher the number, the higher
41+
// will it be listed in the navigation
42+
'order' => 90,
43+
44+
// the route that will be shown on startup
45+
'href' => $urlGenerator->linkToRoute('settings.SettingsPage.getPersonal', ['sectionid' => 'customgroups']),
46+
47+
// the icon that will be shown in the navigation
48+
// this file needs to exist in img/
49+
'icon' => $urlGenerator->imagePath('customgroups', 'app.svg'),
50+
51+
// the title of your application. This will be used in the
52+
// navigation or on the settings page of your app
53+
'name' => \OC::$server->getL10N('customgroups')->t('Groups'),
54+
];
55+
});

0 commit comments

Comments
 (0)