AdminForthPluginType
Properties
adminforth
adminforth:
AdminForthClass
customFolderName
customFolderName:
string
pluginDir
pluginDir:
string
pluginInstanceId
pluginInstanceId:
string
Methods
componentPath()
componentPath(
componentFile
):string
Parameters
Parameter | Type |
---|---|
componentFile | string |
Returns
string
modifyResourceConfig()
modifyResourceConfig(
adminforth
,resourceConfig
):void
AdminForth plugins concept is based on modification of full AdminForth configuration to add some custom functionality. For example plugin might simply add custom field to resource by reusing AdminForthResourceColumn.components object, then add some hook which will modify record before getting or saving it to database.
So this method is core of AdminForth plugins. It allows to modify full resource configuration.
Parameters
Parameter | Type | Description |
---|---|---|
adminforth | AdminForthClass | Instance of AdminForthClass |
resourceConfig | AdminForthResource | Resource configuration object which will be modified by plugin |
Returns
void
setupEndpoints()
setupEndpoints(
server
):void
Here you can register custom endpoints for your plugin.
Parameters
Parameter | Type | Description |
---|---|---|
server | GenericHttpServer |
Returns
void