• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_sect.php
  • Класс: CCalendarSect
  • Вызов: CCalendarSect::prepareSectionQueryData
static function prepareSectionQueryData($query)
{
	$sectionIdList = [];
	$result = [];

	while ($section = $query->fetch())
	{
		$section['COLOR'] = CCalendar::Color($section['COLOR']);
		$section['NAME'] = Emoji::decode($section['NAME']);

		if (!empty($section['DATE_CREATE']))
		{
			$section['DATE_CREATE'] = (string)$section['DATE_CREATE'];
		}

		if (!empty($section['TIMESTAMP_X']))
		{
			$section['TIMESTAMP_X'] = (string)$section['TIMESTAMP_X'];
		}

		$sectionId = (int)$section['ID'];
		$sectionIdList[] = $sectionId;
		$result[$sectionId] = $section;
	}

	return [$sectionIdList, $result];
}