Fix: Add proper Application.php and fix DI
- Created appinfo/Application.php (Nextcloud app bootstrap) - Extends OCP\AppFramework\App - Registers proper app ID: analyticshub - Loads CSS and JS files - Removed obsolete lib/App.php file - Updated all AppInfo::APP_NAME references to Application::APP_NAME - AdminController, ApiV1Controller - GoogleAnalyticsService, LLMService - Fixed dependency injection in AdminController - Injected IConfig service properly - Added missing use statements This is the core fix for the app not appearing in Nextcloud. Nextcloud requires appinfo/Application.php to initialize the app.
This commit is contained in:
25
analyticshub/appinfo/Application.php
Normal file
25
analyticshub/appinfo/Application.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OCA\AnalyticsHub\AppInfo;
|
||||
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\Util;
|
||||
|
||||
/**
|
||||
* Application class for Mini-CMO Analytics Hub
|
||||
*/
|
||||
class Application extends App {
|
||||
|
||||
public const APP_NAME = 'analyticshub';
|
||||
public const APP_ID = 'analyticshub';
|
||||
|
||||
public function __construct(array $urlParams = []) {
|
||||
parent::__construct(self::APP_ID, $urlParams);
|
||||
|
||||
// Load scripts and styles
|
||||
Util::addStyle(self::APP_ID, 'admin');
|
||||
Util::addScript(self::APP_ID, 'admin');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user