Do not use OCP\Util anymore - API not avaiable in Nextcloud 14.
[grauphel.git] / appinfo / app.php
index 704b2c77250346bb924a538c0f26a2296d421fca..1fb5551b75e37cf535338fe24179c1a6678f6827 100755 (executable)
@@ -1,15 +1,17 @@
 <?php
-//OCP\App::registerAdmin( 'apptemplate', 'settings' );
-
-OCP\App::addNavigationEntry(
+\OC::$server->getNavigationManager()->add(
     array( 
         'id' => 'grauphel',
         'order' => 2342,
-        'href' => \OCP\Util::linkToRoute('grauphel.gui.index'),
-        'icon' => OCP\Util::imagePath('grauphel', 'tomboy-grey.png'),
+        'href' => \OC::$server->getURLGenerator()->linkToRoute('grauphel.gui.index'),
+        'icon' => \OC::$server->getURLGenerator()->imagePath('grauphel', 'app.svg'),
         'name' => 'Tomboy notes'
     )
 );
-\OC_Search::registerProvider('OCA\Grauphel\Search\Provider');
+
+\OC::$server->getSearch()->registerProvider(
+    'OCA\Grauphel\Search\Provider', array('apps' => array('grauphel'))
+);
+
 \OCP\Util::addscript('grauphel', 'loader');
 ?>