()
| 152 | } |
| 153 | |
| 154 | destroy() { |
| 155 | if (!this.config) { |
| 156 | return |
| 157 | } |
| 158 | |
| 159 | try { |
| 160 | const { lifeCycles = {} } = this.config |
| 161 | this.unregisterHooks() |
| 162 | lifeCycles?.destroy?.(this) |
| 163 | } catch (err) { |
| 164 | logger.warn(err) |
| 165 | } |
| 166 | |
| 167 | this.eventBus.emit(EDITOR_EVENT.DESTROY) |
| 168 | } |
| 169 | |
| 170 | async extend(pluginManager: Plugins) { |
| 171 | this.eventBus.emit(EDITOR_EVENT.BEFORE_EXTEND) |