CBPWorkflow::removeEventHandler

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPWorkflow
  4. removeEventHandler
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/workflow.php
  • Класс: CBPWorkflow
  • Вызов: CBPWorkflow::removeEventHandler
public function removeEventHandler($eventName, IBPActivityExternalEventListener $eventHandler)
{
	if (!is_array($this->rootActivity->arEventsMap))
		$this->rootActivity->arEventsMap = array();

	if (!array_key_exists($eventName, $this->rootActivity->arEventsMap))
		$this->rootActivity->arEventsMap[$eventName] = array();

	$idx = array_search($eventHandler, $this->rootActivity->arEventsMap[$eventName], true);
	if ($idx !== false)
		unset($this->rootActivity->arEventsMap[$eventName][$idx]);

	if (count($this->rootActivity->arEventsMap[$eventName]) <= 0)
		unset($this->rootActivity->arEventsMap[$eventName]);
}

Добавить комментарий