diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-12-08 17:43:46 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-12-22 12:34:41 +0100 |
commit | aa8755bd4b2d5a949a35f1308eefa6d00140a1a7 (patch) | |
tree | 09153939dd285480a1225290d7bde664e41826fa /apps/files/appinfo | |
parent | 7f8d22e7102293d96c365b380bf1845ff2de6b71 (diff) | |
download | nextcloud-server-aa8755bd4b2d5a949a35f1308eefa6d00140a1a7.tar.gz nextcloud-server-aa8755bd4b2d5a949a35f1308eefa6d00140a1a7.zip |
Add navigation via info.xml (#26785)
* Read navigation information from info.xml
* Load files navigation elements from info.xml
* Add comment about ignoring the exception
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r-- | apps/files/appinfo/app.php | 14 | ||||
-rw-r--r-- | apps/files/appinfo/info.xml | 6 |
2 files changed, 8 insertions, 12 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php index a194bb5e795..63acda3a706 100644 --- a/apps/files/appinfo/app.php +++ b/apps/files/appinfo/app.php @@ -26,20 +26,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ +// required for translation purpose +// t('Files') $l = \OC::$server->getL10N('files'); -\OC::$server->getNavigationManager()->add(function () { - $urlGenerator = \OC::$server->getURLGenerator(); - $l = \OC::$server->getL10N('files'); - return [ - 'id' => 'files_index', - 'order' => 0, - 'href' => $urlGenerator->linkToRoute('files.view.index'), - 'icon' => $urlGenerator->imagePath('core', 'places/files.svg'), - 'name' => $l->t('Files'), - ]; -}); - \OC::$server->getSearch()->registerProvider('OC\Search\Provider\File', array('apps' => array('files'))); $templateManager = \OC_Helper::getFileTemplateManager(); diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index a25c043f332..1171c0ceb6f 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -53,4 +53,10 @@ <command>OCA\Files\Command\DeleteOrphanedFiles</command> <command>OCA\Files\Command\TransferOwnership</command> </commands> + + <navigation> + <route>files.view.index</route> + <order>0</order> + </navigation> + </info> |