• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/stagehistory.php
  • Класс: Bitrix\Crm\Controller\StageHistory
  • Вызов: StageHistory::prepareSelect
private function prepareSelect(array $select, array $fields): array
{
	$result = [];
	foreach ($select as $field)
	{
		if (in_array($field, $fields))
		{
			$result[] = $field;
		}
	}
	if (empty($result))
	{
		$result = $fields;
	}
	if (!in_array('ID', $result))
	{
		$result[] = 'ID';
	}

	return $result;
}