• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/taskfilterctrl.php
  • Класс: CTaskFilterCtrl
  • Вызов: CTaskFilterCtrl::removePreset
public function removePreset($presetId)
{
	global $DB, $CACHE_MANAGER;

	CTaskAssert::assertLaxIntegers($presetId);
	CTaskAssert::assert($presetId > 0);

	// Switch to default preset, if preset to be removed is selected now
	if ($this->getSelectedFilterPresetId() == $presetId)
		$this->switchFilterPreset(self::STD_PRESET_ALIAS_TO_DEFAULT);

	$DB->query(
		"DELETE FROM b_tasks_filters
		WHERE ID = " . (int) $presetId
			. " AND USER_ID = " . (int) $this->userId
	);

	$this->reloadPresetsCache();
	$CACHE_MANAGER->ClearByTag('tasks_filters_presets_' . $this->userId);
}