Replace Addon::DIRECTORY with AddonHelper::getAddonPath()

This commit is contained in:
Art4 2025-02-04 15:18:23 +00:00
parent 4e9276e1c9
commit d8470b68df
11 changed files with 83 additions and 31 deletions

View file

@ -42,7 +42,7 @@ class Config
*
* @return Util\ConfigFileManager
*/
public function createConfigFileManager(string $basePath, array $server = []): Util\ConfigFileManager
public function createConfigFileManager(string $basePath, string $addonPath, array $server = []): Util\ConfigFileManager
{
if (!empty($server[self::CONFIG_DIR_ENV]) && is_dir($server[self::CONFIG_DIR_ENV])) {
$configDir = $server[self::CONFIG_DIR_ENV];
@ -51,7 +51,7 @@ class Config
}
$staticDir = $basePath . DIRECTORY_SEPARATOR . self::STATIC_DIR;
return new Util\ConfigFileManager($basePath, $configDir, $staticDir, $server);
return new Util\ConfigFileManager($basePath, $addonPath, $configDir, $staticDir, $server);
}
/**