2020-10-18 09:44:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\Radio\AppInfo;
|
|
|
|
|
2020-11-04 09:32:06 +00:00
|
|
|
use OCA\Radio\Search\SearchProvider;
|
2020-10-18 09:44:19 +00:00
|
|
|
use OCP\AppFramework\App;
|
|
|
|
use OCP\AppFramework\Bootstrap\IBootContext;
|
|
|
|
use OCP\AppFramework\Bootstrap\IBootstrap;
|
|
|
|
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
2020-10-27 12:43:30 +00:00
|
|
|
use OCP\IRequest;
|
2020-10-18 09:44:19 +00:00
|
|
|
|
2020-11-10 13:37:36 +00:00
|
|
|
use OCA\Radio\Dashboard\RadioWidget;
|
|
|
|
|
2020-10-18 09:44:19 +00:00
|
|
|
class Application extends App implements IBootstrap {
|
|
|
|
|
|
|
|
public const APP_ID = 'radio';
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
parent::__construct(self::APP_ID);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function register(IRegistrationContext $context): void {
|
2020-10-27 12:43:30 +00:00
|
|
|
|
2020-11-04 09:32:06 +00:00
|
|
|
$context->registerSearchProvider(SearchProvider::class);
|
2020-11-10 13:37:36 +00:00
|
|
|
$context->registerDashboardWidget(RadioWidget::class);
|
|
|
|
|
2020-10-27 12:43:30 +00:00
|
|
|
$context->registerService('request', static function ($c) {
|
|
|
|
return $c->get(IRequest::class);
|
|
|
|
});
|
|
|
|
|
2020-10-18 09:44:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function boot(IBootContext $context): void {
|
|
|
|
}
|
|
|
|
}
|