} catch (NotFoundException $e) {
$moduleName = $this->args->getModuleName();
// Then we try addon-provided modules that we wrap in the LegacyModule class
- if ($this->addonHelper->isEnabled($moduleName) && file_exists("addon/{$moduleName}/{$moduleName}.php")) {
+ if ($this->addonHelper->isAddonEnabled($moduleName) && file_exists("addon/{$moduleName}/{$moduleName}.php")) {
//Check if module is an app and if public access to apps is allowed or not
$privateapps = $this->config->get('config', 'private_addons', false);
if (!$this->isLocalUser && Hook::isAddonApp($moduleName) && $privateapps) {
/**
* Checks if the provided addon is enabled
*/
- public function isEnabled(string $addonId): bool;
+ public function isAddonEnabled(string $addonId): bool;
/**
* Returns a list with the IDs of the enabled addons
*
* @return string[]
*/
- public function getEnabledList(): array;
+ public function getEnabledAddons(): array;
/**
- * Returns the list of the IDs of the non-hidden enabled addons
+ * Returns a list with the IDs of the non-hidden enabled addons
*
* @return string[]
*/
- public static function getVisibleList(): array;
+ public static function getVisibleEnabledAddons(): array;
}
/**
* Checks if the provided addon is enabled
*/
- public function isEnabled(string $addonId): bool
+ public function isAddonEnabled(string $addonId): bool
{
return Addon::isEnabled($addonId);
}
*
* @return string[]
*/
- public function getEnabledList(): array
+ public function getEnabledAddons(): array
{
return Addon::getEnabledList();
}
/**
- * Returns the list of the IDs of the non-hidden enabled addons
+ * Returns a list with the IDs of the non-hidden enabled addons
*
* @return string[]
*/
- public static function getVisibleList(): array
+ public static function getVisibleEnabledAddons(): array
{
return Addon::getVisibleList();
}
$addonHelper = DI::addonHelper();
$addon = $_GET['addon'] ?? '';
- if ($addonHelper->isEnabled($addon)) {
+ if ($addonHelper->isAddonEnabled($addon)) {
Addon::uninstall($addon);
DI::sysmsg()->addInfo(DI::l10n()->t('Addon %s disabled.', $addon));
} elseif (Addon::install($addon)) {
'$platform' => App::PLATFORM,
'$codename' => App::CODENAME,
'$build' => DI::config()->get('system', 'build'),
- '$addons' => [DI::l10n()->t('Active addons'), DI::addonHelper()->getEnabledList()],
+ '$addons' => [DI::l10n()->t('Active addons'), DI::addonHelper()->getEnabledAddons()],
'$serversettings' => $server_settings,
'$warningtext' => $warningtext,
]);