• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/mapper.php
  • Класс: BitrixCalendarCoreMappersMapper
  • Вызов: Mapper::getById
public function getById(int $id): ?object
{
	if ($this->getCacheMap()->has($id))
	{
		return $this->getCacheMap()->getItem($id);
	}

	$entity = $this->getOneEntityByFilter([
		'=ID' => $id,
	]);

	if (!is_null($entity))
	{
		$this->getCacheMap()->add($entity, $id);
	}

	return $entity;
}