Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ExtensionData

Index

Constructors

constructor

Properties

Protected state

Methods

extensionHasPermissions

  • extensionHasPermissions(extension: string): boolean

for

  • This function simply takes the extension id

    example

    app.extensionData.for('flarum-tags')

    flarum/flags -> flarum-flags | acme/extension -> acme-extension

    Parameters

    • extension: string

    Returns ExtensionData

getAllExtensionPermissions

getExtensionPermissions

getPage

getSettings

registerPage

registerPermission

  • This function registers your permission with Flarum

    example

    .registerPermission('permissions', { icon: 'fas fa-flag', label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'), permission: 'discussion.viewFlags' }, 'moderate', 65)

    Parameters

    Returns ExtensionData

registerSetting

  • This function registers your settings with Flarum

    It takes either a settings object or a callback.

    example

    .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)

    Parameters

    Returns ExtensionData

Generated using TypeDoc version 0.22.10