tachybase_todo/docs/tr-TR/api/server/plugin-manager.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

737 B

PluginManager

应用插件管理器的实例,由应用自动创建,可以通过 app.pm 访问。

实例方法

create()

在本地创建一个插件脚手架

签名

create(name, options): void;

addStatic()

签名

addStatic(plugin: any, options?: PluginOptions): Plugin;

示例

pm.addStatic('nocobase');

add()

签名

async add(plugin: any, options?: PluginOptions): Promise<Plugin>;
async add(plugin: string[], options?: PluginOptions): Promise<Plugin[]>;

示例

await pm.add(['test'], {
  builtIn: true,
  enabled: true,
});

get()

获取插件实例

enable()

disable()

remove()

upgrade()