IMOpenLineTracker::prepareChannelGroupInfos

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. IMOpenLineTracker
  4. prepareChannelGroupInfos
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/channel/imopenlinetracker.php
  • Класс: Bitrix\Crm\Integration\Channel\IMOpenLineTracker
  • Вызов: IMOpenLineTracker::prepareChannelGroupInfos
public function prepareChannelGroupInfos()
{
	$sort = 1000;
	$result = array(
		"IMOPENLINE" => new ChannelGroupInfo(
			$this,
			"IMOPENLINE",
			Loc::getMessage('IMOPENLINE_CHANNEL'),
			$sort,
			false,
			ImOpenLines\Helper::getListUrl()
		)
	);

	foreach($this->getItems() as $item)
	{
		$itemID = (int)$item['ID'];
		$itemName = isset($item['LINE_NAME']) ? $item['LINE_NAME'] : "[{$itemID}]";
		$groupID = "IMOPENLINE_{$itemID}";
		$result[$groupID] = new ChannelGroupInfo(
			$this,
			$groupID,
			$itemName,
			($sort += 100),
			true,
			ImOpenLines\Helper::getConnectorUrl('', $itemID)
		);
		$result[$groupID]->setParentID("IMOPENLINE");
	}
	return $result;
}

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