flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.36k stars 835 forks source link

feat: add `whenExtensionDisabled` to `Conditional` extender #3847

Closed imorland closed 1 year ago

imorland commented 1 year ago

Follow up to #3759

Adds whenExtensionDisabled condition to the Conditional extender. Enables developers to provide extend items when a given extension is not installed/enabled.

Usage example:

return [
    (new Extend\Conditional)
        ->whenExtensionDisabled('flarum-tags', [
                ...
        ]),
]