• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_sect.php
  • Класс: CCalendarSect
  • Вызов: CCalendarSect::containsLocalSection
static function containsLocalSection($sections, $type): bool
{
	if ($type !== 'user')
	{
		return true;
	}

	if ($sections && is_array($sections))
	{
		foreach ($sections as $section)
		{
			if (
				$section['EXTERNAL_TYPE'] === self::EXTERNAL_TYPE_LOCAL
				&& $section['CAL_TYPE'] === 'user'
				&& (int)$section['OWNER_ID'] === CCalendar::GetOwnerId()
			)
			{
				return true;
			}
		}
	}

	return false;
}