• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/ical/builder/event.php
  • Класс: BitrixCalendarICalBuilderEvent
  • Вызов: Event::setContent
public function setContent(): Content
{
	$content = Content::getInstance(self::TYPE)
		->textProperty('UID', $this->uid)
		->textProperty('SUMMARY', $this->name)
		->textProperty('DESCRIPTION', $this->description)
		->textProperty('LOCATION', $this->address)
		->textProperty('CLASS', $this->classification)
		->textProperty('TRANSP', $this->transparent)
		->textProperty('STATUS', $this->status)
		->textProperty('LOCATION', $this->location)
		->textProperty('SEQUENCE', $this->sequence)
		->property(AttendeesPropertyType::createInstance('ORGANIZER', $this->organizer))
		->dateTimeProperty('DTSTART', $this->starts, $this->withTime, $this->withTimezone)
		->dateTimeProperty('DTEND', $this->ends, $this->withTime, $this->withTimezone)
		->dateTimeProperty('DTSTAMP', $this->dtStamp, true, false, true)
		->dateTimeProperty('CREATED', $this->created, true, false, true)
		->dateTimeProperty('LAST-MODIFIED', $this->modified, true, false, true)
		->subComponent(...$this->alerts);

	foreach ($this->attendees as $attendee)
	{
		$content->property(AttendeesPropertyType::createInstance('ATTENDEE', $attendee));
	}

	if ($this->isRecurringEvent())
	{
		$content->property(RecurrenceRulePropertyType::createInstance('RRULE', $this->rrule));

		if (!empty($this->exdates))
		{
			foreach ($this->exdates as $exdate)
			{
				$content->dateTimeProperty('EXDATE', $exdate, $this->withTime, $this->withTimezone);
			}
		}
	}

	if (!empty($this->attaches))
	{
		foreach ($this->attaches as $attach)
		{
			$content->property(AttachPropertyType::getInstance('ATTACH', $attach));
		}
	}

	if (!empty($this->url))
	{
		$content->textProperty('URL', $this->url);
	}

	return $content;
}