• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/userfield/resourcebooking.php
  • Класс: BitrixCalendarUserFieldResourceBooking
  • Вызов: ResourceBooking::parseValue
static function parseValue($value)
{
	$res = false;
	if(mb_strpos($value, '|') >= 0)
	{
		$list = explode('|', $value);
		$type = $list[0] ?? null;
		$id = $list[1] ?? null;
		$from = $list[2] ?? null;
		$duration = $list[3] ?? null;
		$serviceName = $list[4] ?? null;
		if ($type === 'user' || ($type === 'resource' && (int)$id > 0))
		{
			$res = array(
				'type' => $type,
				'id' => $id,
				'from' => $from,
				'duration' => $duration,
				'serviceName' => $serviceName ? $serviceName : ''
			);
		}
	}
	return $res;
}