Migrate away from deprecated app.php file

master
Alfred Egger 2021-01-01 01:00:49 +01:00
parent 8c2350685b
commit efc851dd9b
2 changed files with 8 additions and 32 deletions

View File

@ -1,32 +0,0 @@
<?php
/**
* ownCloud - weather
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Loic Blot <loic.blot@unix-experience.fr>
* @copyright Loic Blot 2015
*/
namespace OCA\Weather\AppInfo;
\OC::$server->getNavigationManager()->add([
// the string under which your app will be referenced in owncloud
'id' => 'weather',
// sorting weight for the navigation. The higher the number, the higher
// will it be listed in the navigation
'order' => 10,
// the route that will be shown on startup
'href' => \OC::$server->getURLGenerator()->linkToRoute('weather.city.index'),
// the icon that will be shown in the navigation
// this file needs to exist in img/
'icon' => \OC::$server->getURLGenerator()->imagePath('weather', 'app.svg'),
// the title of your application. This will be used in the
// navigation or on the settings page of your app
'name' => \OCP\Util::getL10N('weather')->t('Weather')
]);

View File

@ -20,4 +20,12 @@
<settings> <settings>
<admin>OCA\Weather\Settings\AdminSettings</admin> <admin>OCA\Weather\Settings\AdminSettings</admin>
</settings> </settings>
<navigations>
<navigation>
<id>weather</id>
<name>Weather</name>
<route>weather.city.index</route>
<icon>app.svg</icon>
</navigation>
</navigations>
</info> </info>