RecurringEventRules::toString

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. RecurringEventRules
  4. toString
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/event/properties/recurringeventrules.php
  • Класс: BitrixCalendarCoreEventPropertiesRecurringEventRules
  • Вызов: RecurringEventRules::toString
public function toString(): string
{
	$result = "FREQ={$this->frequency}";

	if ($this->count > 0)
	{
		$result .= ",COUNT={$this->count}";
	}

	if (isset($this->until))
	{
		$result .= ",UNTIL={$this->until}";
	}

	if (isset($this->interval))
	{
		$result .= ",INTERVAL={$this->interval}";
	}

	if (isset($this->byDay) && $this->frequency === self::FREQUENCY_WEEKLY)
	{
		$byDayString = implode(',',$this->byDay);
		$result .= ",BYDAY={$byDayString}";
	}

	return $result;
}

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