ExtensionPage
Extends:
Member Summary
Public Members | ||
public |
|
|
public |
extension: * |
|
public |
infoFields: {"discuss": string, "documentation": string, "support": string, "website": string, "donate": string, "source": string} |
|
public |
|
|
public |
settings: {} |
Method Summary
Public Methods | ||
public |
buildSettingComponent(setting: *): JSX.Element getSetting takes a settings object and turns it into a component. |
|
public |
className(): * |
|
public |
content(): * |
|
public |
dirty(): * |
|
public |
|
|
public |
infoItems(): * |
|
public |
isChanged(): * |
|
public |
isEnabled(): * |
|
public |
onerror(e: *) |
|
public |
oninit(vnode: *) |
|
public |
onsaved() |
|
public |
saveSettings(e: *) |
|
public |
sections(): * |
|
public |
|
|
public |
submitButton(): * |
|
public |
toggle() |
|
public |
topItems(): * |
|
public |
view(): * |
Inherited Summary
From class Page | ||
public |
A class name to apply to the body while the route is active. |
|
public |
Whether we should scroll to the top of the page when its rendered. |
|
public |
Whether the browser should restore scroll state on refreshes. |
|
public |
oncreate(vnode: *) |
|
public |
oninit(vnode: *) |
|
public |
onremove() |
Public Members
public extension: * source
public infoFields: {"discuss": string, "documentation": string, "support": string, "website": string, "donate": string, "source": string} source
public settings: {} source
Public Methods
public buildSettingComponent(setting: *): JSX.Element source
getSetting takes a settings object and turns it into a component. Depending on the type of input, you can set the type to 'bool', 'select', or any standard <input> type.
Alternatively, you can pass a callback that will be executed in ExtensionPage's context to include custom JSX elements.
Params:
Name | Type | Attribute | Description |
setting | * |
Return:
JSX.Element |
Example:
{
setting: 'acme.checkbox',
label: app.translator.trans('acme.admin.setting_label'),
type: 'bool'
}
{
setting: 'acme.select',
label: app.translator.trans('acme.admin.setting_label'),
type: 'select',
options: {
'option1': 'Option 1 label',
'option2': 'Option 2 label',
},
default: 'option1',
}
public onerror(e: *) source
Params:
Name | Type | Attribute | Description |
e | * |
public onsaved() source
public saveSettings(e: *) source
Params:
Name | Type | Attribute | Description |
e | * |
public setting(key: *, fallback: string): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
fallback | string |
|
Return:
* |