• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_document_deal.php
  • Класс: \CCrmDocumentDeal
  • Вызов: CCrmDocumentDeal::getDocumentCategories
static function getDocumentCategories($documentType)
{
	$factory = Crm\Service\Container::getInstance()->getFactory(CCrmOwnerType::Deal);
	$categories = null;

	if ($factory->isCategoriesSupported())
	{
		$categories = [];
		foreach ($factory->getCategories() as $category)
		{
			$categories[$category->getId()] = [
				'id' => $category->getId(),
				'name' => $category->getName(),
			];
		}
	}

	return $categories;
}