Documentation

GetSelectedFilterPresetCondition

array
public function getSelectedFilterPresetCondition();

This method returns the condition of the current selected filter.

Returned value

Returns the condition of the current deleted filter as an array which can be passed as the $arFilter parameter to the CTasks::GetList() method;

Examples of use

<?php
CModule::IncludeModule('tasks');
$userId = (int) $GLOBALS['USER']->getId();
$bGroupMode = false;
$oFilter = CTaskFilterCtrl::getInstance($userId, $bGroupMode);

$arFilter = $oFilter->getSelectedFilterPresetCondition();

// Show the filter conditions
var_dump($arFilter);

// This condition can be used in CTasks::GetList();
$rsTasks = CTasks::GetList(array(), $arFilter);
?>


© «Bitrix24», 2001-2024
Up