• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_event.php
  • Класс: CCalendarEvent
  • Вызов: CCalendarEvent::GetChildEvents
static function GetChildEvents($parentId)
{
	global $DB;

	$arFields = self::GetFields();
	$childEvents = [];
	$selectList = "";
	foreach($arFields as $field)
		$selectList .= $field['FIELD_NAME'].", ";
	$selectList = trim($selectList, ' ,').' ';

	if ($parentId > 0)
	{

		$strSql = "
			SELECT ".
			$selectList.
			"FROM b_calendar_event CE WHERE CE.PARENT_ID=". (int)$parentId;

		$res = $DB->Query($strSql, false, "File: ".__FILE__."
Line: ".__LINE__); while($event = $res->Fetch()) { $childEvents[] = $event; } } return false; }