nocobase/docs/tr-TR/development/life-cycle.md
altaytahsin ad4929e48b
Turkish language created for Docs. Belgeler için türkçe dil desteği (#1071)
* Turkish language created for Docs. Belgeler için türkçe dil desteği oluşturuldu.

* Turkish docs fix
2022-12-23 09:42:44 +08:00

882 B

Life cycle

Lifecycle of applications

Lifecycle of plugins

Lifecycle methods for plugins

import { InstallOptions, Plugin } from '@nocobase/server';

export class MyPlugin extends Plugin {
  afterAdd() {
    // After the plugin pm.add is registered. Mainly used to place the app.beforeLoad event.
  beforeLoad() { }
  beforeLoad() {
    // Before all plugins are loaded. Generally used for registering classes and event listeners
  }
  async load() {
    // Load configuration
  }
  async install(options?: InstallOptions) {
    // Logic for installing
  }
  async afterEnable() {
    // After activation
  }
  async afterDisable() {
    // After disable
  }
  async remove() {
    // Logic for removing
  }
}

export default MyPlugin;