Protected
stateThis function simply takes the extension id
app.extensionData.for('flarum-tags')
flarum/flags -> flarum-flags | acme/extension -> acme-extension
Get an ItemList of all extensions' registered permissions
Get a singular extension's registered permissions
Returns an extension's custom page component if it exists.
Get an extension's registered settings
Replace the default extension page with a custom component. This component would typically extend ExtensionPage
This function registers your permission with Flarum
.registerPermission('permissions', {
icon: 'fas fa-flag',
label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'),
permission: 'discussion.viewFlags'
}, 'moderate', 65)
This function registers your settings with Flarum
It takes either a settings object or a callback.
.registerSetting({
setting: 'flarum-flags.guidelines_url',
type: 'text', // This will be inputted into the input tag for the setting (text/number/etc)
label: app.translator.trans('flarum-flags.admin.settings.guidelines_url_label')
}, 15) // priority is optional (ItemList)
Generated using TypeDoc v0.24.8
Checks whether a given extension has registered permissions.