Bitrix Site Manager

CStatEventType::GetSimpleList

CDBResult
CStatEventType::GetSimpleList(
 string &by = "s_event1",
 string &order = "desc",
 array filter = array(),
 bool &is_filtered
)

The method GetSimpleList returns a brief list of event types.

Parameters

Parameter Description
by Sorting field; possible values:
  • s_id - the event type ID;
  • s_event1 - the event1 identifier of the event type;
  • s_event2 - the event2 identifier of the event type;
  • s_name - the event type name;
  • s_description - event type description.
order Sort order; the following values are possible:
  • asc - ascending;
  • desc - descending.
filter Array used to filter the resulting list. The following keys can be used in the array:
  • ID* - the event type ID;
  • ID_EXACT_MATCH - if "N", entry in the ID is sufficient (loose match);
  • EVENT1* - the event1 event type identifier;
  • EVENT1_EXACT_MATCH - if "Y", the EVENT1 must match exactly (strict match);
  • EVENT2* - the event2 event type identifier;
  • EVENT2_EXACT_MATCH - if "Y", the EVENT2 must match exactly (strict match);
  • NAME* - the event type name;
  • NAME_EXACT_MATCH - if "Y", the NAME must match exactly (strict match);
  • DESCRIPTION* - event type description;
  • DESCRIPTION_EXACT_MATCH - if "Y", the DESCRIPTION must match exactly (strict match);
  • KEYWORDS - event1, event2, name and description of the event type;
  • KEYWORDS_EXACT_MATCH - if "Y", the KEYWORDS must match exactly (strict match).
* - complex logic allowed.
is_filtered If this flag contains "true" on return, the resulting list is filtered.

Structure of the returned record

Array
(
    [ID] => the event type ID
    [EVENT1] => the event1 identifier of the event type
    [EVENT2] => the event2 identifier of the event type
    [NAME] => the event type name
    [EVENT] => event1 / event2, the event type name if specified
    [DESCRIPTION] => event type description
)

See Also

Example



<?
// select only those event types whose event1 = "download"
$arFilter = array(
    "EVENT1" => "download"
    );

// obtain the list of records
$rs = CStatEventType::GetSimpleList(
    ($by="s_event2"), 
    ($order="desc"), 
    $arFilter, 
    $is_filtered
    );

// print all records
while ($ar = $rs->Fetch())
{
    echo "<pre>"; print_r($ar); echo "</pre>";    
}
?>