EventBuilderFromArray::getExcludedDate

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. EventBuilderFromArray
  4. getExcludedDate
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/builders/eventbuilderfromarray.php
  • Класс: BitrixCalendarCoreBuildersEventBuilderFromArray
  • Вызов: EventBuilderFromArray::getExcludedDate
protected function getExcludedDate(): EventPropertiesExcludedDatesCollection
{
	if (empty($this->fields['EXDATE']))
	{
		return new EventPropertiesExcludedDatesCollection();
	}

	$collection = new EventPropertiesExcludedDatesCollection();
	if (is_string($this->fields['EXDATE']))
	{
		foreach (explode(";", $this->fields['EXDATE']) as $exDate)
		{
			$collection->add($this->createDateForRecurrence($exDate));
		}
	}

	else if (is_array($this->fields['EXDATE']))
	{
		foreach ($this->fields['EXDATE'] as $exDate)
		{
			$collection->add($this->createDateForRecurrence($exDate));
		}
	}

	return $collection;
}

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