SectionModel::createFromEventModelParentFields

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. SectionModel
  4. createFromEventModelParentFields
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/access/model/sectionmodel.php
  • Класс: BitrixCalendarAccessModelSectionModel
  • Вызов: SectionModel::createFromEventModelParentFields
static function createFromEventModelParentFields(EventModel $eventModel): self
{
	if ($eventModel->getSectionId() > 0)
	{
		$model = self::createFromId($eventModel->getParentEventSectionId());
	}
	else
	{
		$model = self::createNew();
	}

	$model
		->setType($eventModel->getParentEventSectionType())
		->setOwnerId($eventModel->getParentEventOwnerId())
	;

	return $model;
}

Добавить комментарий