Skip to content
Corex

AddonToggleService

Corex\Config\Addons\AddonToggleService · class · Config layer

Turns an add-on on or off for this site and says what happened (spec 114, US-SAFE-08). An add-on active for the whole network, or installed as must-use, is not this site’s to switch off: disabling one is refused here, whatever the request asked. Every attempt, the refused and the failed among them, is written to the activity log with who asked and what came of it.

__construct(AddonActivator $activator, ActivityService $activity, AccessUserDirectory $users)

Section titled “__construct(AddonActivator $activator, ActivityService $activity, AccessUserDirectory $users)”

lockedReason(ActivationScope $scope): string

Section titled “lockedReason(ActivationScope $scope): string”

Why this site cannot switch the add-on off, or ” when it can.

enable(Addon $addon, int $actorId): AddonToggleResult

Section titled “enable(Addon $addon, int $actorId): AddonToggleResult”

disable(Addon $addon, ActivationScope $scope, int $actorId): AddonToggleResult

Section titled “disable(Addon $addon, ActivationScope $scope, int $actorId): AddonToggleResult”