Bitrix Site Manager

CEventMessage::GetList

CDBResult
CEventMessage::GetList(
 string &by="id",
 string &order="desc",
 array filter
)

The method GetList returns the list of mail templates as CDBResult instance.

Parameters

ParameterDescription
by Reference to the variable containing the sorting field. The following values are possible:
  • site_id - site ID;
  • subject - subject;
  • timestamp_x - modification date;
  • event_name - event type;
  • id - template ID;
  • active - active state;
Órder Reference to the variable containing the sorting field. The following values are possible:
  • asc - ascending;
  • desc - descending;
filter An array of the format Array("filtered field"=>"value" [, ...]). The following values are possible:
  • ID - template ID;
  • TYPE - code and header of the event type (complex logic allowed);
  • TYPE_ID - the event type code  (complex logic allowed);
  • TIMESTAMP_1 - lower bound of the modification date range ("from");
  • TIMESTAMP_2 - upper bound of the modification date range ("till");
  • SITE_ID - site ID (this field may contain either an array for disjunctive searches or complex logic can be used);
  • ACTIVE - active state flag (Y|N);
  • FROM - "From" field (complex logic allowed);
  • TO - "To" field (complex logic allowed);
  • BCC - "BCC" field (complex logic allowed);
  • SUBJECT - by message subject (complex logic allowed);
  • BODY_TYPE - by message body type (text|html);
  • BODY - by message body (complex logic allowed);

See Also

Example



<?
$arFilter = Array(
    "ID"            => "12 | 134",
    "TYPE"          => "contract & adv",
    "TYPE_ID"       => "ADV_BANNER | ADV_CONTRACT",
    "TIMESTAMP_1"   => "12.11.2001",
    "TIMESTAMP_2"   => "12.11.2005",
    "SITE_ID"       => "ru | en",
    "ACTIVE"        => "Y",
    "FROM"          => "bitrixsoft.com",
    "TO"            => "#TO#",
    "BCC"           => "admin",
    "SUBJECT"       => "contract",
    "BODY_TYPE"     => "text",
    "BODY"          => "auto"
    );
$rsMess = CEventMessage::GetList($by="site_id", $order="desc", $arFilter);
$is_filtered = $rsMess->is_filtered;
?>