コード例 #1
0
ファイル: app.php プロジェクト: Graf-Zahl/music
<?php

/**
 * ownCloud - Music app
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Morris Jobke <*****@*****.**>
 * @copyright Morris Jobke 2013, 2014
 */
namespace OCA\Music\App;

$app = new Music();
$c = $app->getContainer();
/**
 * add navigation
 */
$navConfig = array('id' => $c->query('AppName'), 'order' => 10, 'name' => $c->query('L10N')->t('Music'), 'href' => $c->query('URLGenerator')->linkToRoute('music.page.index'), 'icon' => $c->query('URLGenerator')->imagePath($c->query('AppName'), 'music.svg'));
$c->query('ServerContainer')->getNavigationManager()->add($navConfig);
/**
 * register regular task
 */
// TODO: this is temporarily static because core jobs are not public
// yet, therefore legacy code
\OCP\Backgroundjob::addRegularTask('OCA\\Music\\Backgroundjob\\CleanUp', 'run');
/**
 * register hooks
 */
// FIXME: this is temporarily static because core emitters are not future
// proof, therefore legacy code in here