GridFilter::isUserFilterApplied

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. GridFilter
  4. isUserFilterApplied
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/project/filter/gridfilter.php
  • Класс: BitrixTasksInternalsProjectFilterGridFilter
  • Вызов: GridFilter::isUserFilterApplied
public function isUserFilterApplied(): bool
{
	if ($filterOptions = $this->getFilterOptions())
	{
		$currentPreset = $filterOptions->getCurrentFilterId();
		$isDefaultPreset = ($filterOptions->getDefaultFilterId() === $currentPreset);
		$additionalFields = $filterOptions->getAdditionalPresetFields($currentPreset);
		$isSearchStringEmpty = ($filterOptions->getSearchString() === '');

		return (!$isSearchStringEmpty || !$isDefaultPreset || !empty($additionalFields));
	}

	return false;
}

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