Documentation

GetList

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

Returns the list of mail templates as the CDBResult instance. Static method.

Parameters

this field may contain either an array for disjunctive searches or complex logic can be used
Parameter Description
by Reference to the variable containing the sorting field. The following values are possible:
  • site_id - site ID;
  • subject - topic;
  • 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 - by ascension;
  • desc - by descension;
filter Array of the format array("filtered field"=>"value" [, ...]). The following values are possible:
  • ID - template ID;
  • TYPE - ID and header for event type (complex logic allowed);
  • TYPE_ID - event type ID (complex logic allowed);
  • TIMESTAMP_1 - lower bound of the modification date range ("from");
  • TIMESTAMP_2 - upper bound of the modification date range ("to");
  • 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

Examples of use

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


© «Bitrix24», 2001-2024
Up