DelFilterEx
DelFilterEx( array vars, string id, bool session = true );
The function clears variables that contain filter values and clears corresponding session parameters.
Note. Function handles variables global scope. It must be considered when creating main component files.
Parameter functions
Parameter | Description |
---|---|
vars | Array of filter variables names.. |
id | Filter ID identifying this filter in the session array: $_SESSION["SESS_ADMIN"] [id] |
session | If true, the filter values will also be deleted from the session array $_SESSION["SESS_ADMIN"][id]Specifies to use the session. If true, the filter values will also be deleted from the session array $_SESSION["SESS_ADMIN"][id]. |
See Also
Examples of use
<? $FilterArr = Array( "find_id", "find_id_exact_match", ); // if "Set filter" button is clicked if (strlen($set_filter)>0) { // remember the filter values in the session InitFilterEx($FilterArr,"ADV_BANNER_LIST","set"); } else { // initialize the filter values from the session InitFilterEx($FilterArr,"ADV_BANNER_LIST","get"); } // if "Reset filter" button is clicked if (strlen($del_filter)>0) DelFilterEx($FilterArr,"ADV_BANNER_LIST"); $arFilter = Array( "ID" => $find_id, "ID_EXACT_MATCH" => $find_id_exact_match, ); $rsBanners = CAdvBanner::GetList($by, $order, $arFilter, $is_filtered); ?>
© «Bitrix24», 2001-2024