. * */ namespace OCA\Richdocuments\AppInfo; use OCA\Richdocuments\Config; $app = new Application(); $c = $app->getContainer(); \OCP\App::registerAdmin('richdocuments', 'admin'); \OCP\App::registerPersonal('richdocuments', 'personal'); $navigationEntry = function () use ($c) { return [ 'id' => 'richdocuments_index', 'order' => 2, 'href' => $c->query('ServerContainer')->getURLGenerator()->linkToRoute('richdocuments.document.index'), 'icon' => $c->query('ServerContainer')->getURLGenerator()->imagePath('richdocuments', 'documents.svg'), 'name' => $c->query('L10N')->t('Collabora Online') ]; }; $c->getServer()->getNavigationManager()->add($navigationEntry); //Script for registering file actions $request = \OC::$server->getRequest(); if (isset($request->server['REQUEST_URI'])) { $url = $request->server['REQUEST_URI']; if (preg_match('%index.php/apps/files(/.*)?%', $url)) { \OCP\Util::addScript('richdocuments', 'viewer/viewer'); } } //Listen to delete file signal \OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");