bugfix: Application.php did not match the controller constructor resulting a broken app
This commit is contained in:
1 parent
ce0b6ccbc7
commit
9d268c967e
1 file changed
-23
@@ -4,32 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\AToCal\AppInfo;
|
||||
|
||||
use OCA\AToCal\Controller\CalendarController;
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\IAppContainer;
|
||||
|
||||
class Application extends App
|
||||
{
|
||||
public const APP_ID = 'atocal';
|
||||
|
||||
public function __construct(array $urlParams = [])
|
||||
{
|
||||
parent::__construct(self::APP_ID, $urlParams);
|
||||
|
||||
$container = $this->getContainer();
|
||||
|
||||
$container->registerService(
|
||||
CalendarController::class,
|
||||
function (IAppContainer $c): CalendarController {
|
||||
return new CalendarController(
|
||||
self::APP_ID,
|
||||
$c->get(\OCP\IRequest::class),
|
||||
$c->get(\OCP\Calendar\IManager::class),
|
||||
$c->get(\OCP\IUserSession::class),
|
||||
$c->get(\OCP\IURLGenerator::class),
|
||||
$c->get(\OCP\IDateTimeZone::class)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user