Skip to main content

AdminForthPluginType

Properties

adminforth

adminforth: AdminForthClass


customFolderName

customFolderName: string


pluginDir

pluginDir: string


pluginInstanceId

pluginInstanceId: string

Methods

componentPath()

componentPath(componentFile): string

Parameters

ParameterType
componentFilestring

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

ParameterTypeDescription
adminforthAdminForthClassInstance of AdminForthClass
resourceConfigAdminForthResourceResource configuration object which will be modified by plugin

Returns

void


setupEndpoints()

setupEndpoints(server): void

Here you can register custom endpoints for your plugin.

Parameters

ParameterTypeDescription
serverGenericHttpServer

Returns

void