• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/component/entitydetails/factorybased.php
  • Класс: Bitrix\Crm\Component\EntityDetails\FactoryBased
  • Вызов: FactoryBased::getAttachedListTabs
protected function getAttachedListTabs(): array
{
	$tabs = [];

	if (!$this->item->isNew() && Loader::includeModule('lists'))
	{
		$attachedIblocks = CLists::getIblockAttachedCrm($this->getEntityName());
		foreach($attachedIblocks as $iblockId => $iblockName)
		{
			$tabId = static::TAB_LISTS_PREFIX . $iblockId;
			$tabs[] = [
				'id' => $tabId,
				'name' => $iblockName,
				'loader' => [
					'serviceUrl' => '/bitrix/components/bitrix/lists.element.attached.crm/lazyload.ajax.php?&site='.SITE_ID.'&'.bitrix_sessid_get().'',
					'componentData' => [
						'template' => '',
						'params' => [
							'ENTITY_ID' => $this->item->getId(),
							'ENTITY_TYPE' => $this->getEntityTypeID(),
							'TAB_ID' => $tabId,
							'IBLOCK_ID' => $iblockId,
						],
					],
				],
			];
		}
	}

	return $tabs;
}