• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/crm.php
  • Класс: BitrixImOpenLinesCrm
  • Вызов: Crm::executeAutomationMessageTrigger
public function executeAutomationMessageTrigger($bindings, $data)
{
	$result = new Result();

	if (!BitrixCrmAutomationFactory::canUseAutomation())
	{
		return $result;
	}

	if (!$this->isSkipAutomationTrigger())
	{
		if(is_array($bindings) || is_array($data))
		{
			//Temporary check for compatibility
			if (class_exists('BitrixCrmAutomationTriggerOpenLineMessageTrigger'))
			{
				$result = OpenLineMessageTrigger::execute($bindings, $data);
			}
		}
		else
		{
			$result->addError(new Error(Loc::getMessage('IMOL_CRM_ERROR_NO_REQUIRED_PARAMETERS'), self::ERROR_IMOL_CRM_NO_REQUIRED_PARAMETERS, __METHOD__));
		}
	}

	return $result;
}