• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Link/Calendar/CalendarItem.php
  • Класс: BitrixImV2LinkCalendarCalendarItem
  • Вызов: CalendarItem::getByCalendarId
static function getByCalendarId(int $id, bool $fillEntity = true): ?self
{
	$ormObject = LinkCalendarTable::query()
		->setSelect(['*'])
		->where('CALENDAR_ID', $id)
		->setLimit(1)
		->fetchObject()
	;

	if ($ormObject === null)
	{
		return null;
	}

	if ($fillEntity)
	{
		return (new static($ormObject))->setEntity(EntityCalendarCalendarItem::initById($id));
	}

	return new static($ormObject);
}