File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/bizproc/debugger/src/pull/command-handler.js
Back
import {Type} from 'main.core'; import {PULL} from "pull.client"; import {EventEmitter} from "main.core.events"; export class CommandHandler extends EventEmitter { #unsubscribe: CallableFunction; #commands = [ 'documentStatus', 'documentValues', 'documentDelete', //workflow 'workflowStatus', 'workflowEventAdd', 'workflowEventRemove', //track 'trackRow', //session 'sessionFinish' ]; constructor() { super(); this.setEventNamespace('BX.Bizproc.Debugger.Pull'); this.#unsubscribe = PULL.subscribe(this); } destroy() { if (Type.isFunction(this.#unsubscribe)) { this.#unsubscribe(); } this.#unsubscribe = null; } getModuleId(): string { return 'bizproc'; } getSubscriptionType() { return BX.PullClient.SubscriptionType.Server; } getMap() { const map = {}; this.#commands.forEach(command => { map[command] = this.#handleCommand.bind(this); }); return map; } #handleCommand(params, extra, command) { this.emit(command, params); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings