• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/EditorAdapter.php
  • Класс: Bitrix\Crm\Service\EditorAdapter
  • Вызов: EditorAdapter::combineConfigIntoOneSection
static function combineConfigIntoOneSection(array $entityConfig, string $title = null): array
{
	$resultSection = [
		'name' => 'main',
		'title' => $title,
		'type' => 'section',
		'elements' => [],
		'data' => [
			'enableTitle' => !empty($title),
			'isRemovable' => false,
		],
	];

	foreach ($entityConfig as $section)
	{
		if (!empty($section['elements']))
		{
			$resultSection['elements'] = array_merge($resultSection['elements'], $section['elements']);
		}
	}

	return [$resultSection];
}