GridFilter::handleDateFilterRow

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. GridFilter
  4. handleDateFilterRow
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/project/filter/gridfilter.php
  • Класс: BitrixTasksInternalsProjectFilterGridFilter
  • Вызов: GridFilter::handleDateFilterRow
private function handleDateFilterRow($id, $filterData, Query $query): Query
{
	$from = "{$id}_from";
	$to = "{$id}_to";

	if (array_key_exists($from, $filterData) && !empty($filterData[$from]))
	{
		$date = MakeTimeStamp($filterData[$from]);
		$date = DateTime::createFromTimestamp($date);
		$query->where("{$id}_START", '>=', $date);
	}
	if (array_key_exists($to, $filterData) && !empty($filterData[$to]))
	{
		$date = MakeTimeStamp($filterData[$to]);
		$date = DateTime::createFromTimestamp($date);
		$query->where("{$id}_FINISH", '<=', $date);
	}

	return $query;
}

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