Dictionary::getCallback

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Dictionary
  4. getCallback
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/webform/options/dictionary.php
  • Класс: Bitrix\Crm\WebForm\Options\Dictionary
  • Вызов: Dictionary::getCallback
public function getCallback(): array
{
	$isEnabled = WebForm\Callback::canUse();
	$numbers = [];
	if ($isEnabled)
	{
		foreach (WebForm\Callback::getPhoneNumbers() as $number)
		{
			$numbers[] = ['id' => $number['CODE'], 'name' => $number['NAME']];
		}
	}

	return [
		'enabled' => $isEnabled,
		'from' => $numbers
	];
}

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