Bitrix Site Manager

CPosting::GetList

CPosting::GetList(
    $aSort=array(), 
    $aFilter=array()
);

The method GetList returns a filtered list of issues.

Parameters

ParameterDescription
aSort Array containing the sort criteria in the form "field name"=>"direction".

The field name can be the following:
  • ID - the issue ID;
  • TIMESTAMP - the modification date;
  • SUBJECT - the message subject;
  • BODY_TYPE - the body type;
  • STATUS - the issue status;
  • DATE_SENT - the date of the message sending;
  • AUTO_SEND_TIME - the time when the issue dispatch is to be started.
The direction can be one of the following:
  • ASC - ascending;
  • DESC - descending.
For example:
array("STATUS"=>"ASC", "DATE_SENT"=>"DESC")
aFilter Array containing the filter in the form of arrays "field name"=>"filter value".

The field name can be the following:
  • ID - the issue ID (complex logic allowed);
  • TIMESTAMP_1 - the earliest possible date of modification;
  • TIMESTAMP_2 - the latest possible date of modification;
  • DATE_SENT_1 - the earliest possible date of the message sending;
  • DATE_SENT_2 - the latest possible date of the message sending;
  • AUTO_SEND_TIME_1 - the date or the time when the dispatch is to be started (lower bound of the range);
  • AUTO_SEND_TIME_2 - the date or the time when the dispatch is to be started (upper bound of the range);
  • STATUS - string containing the issue status (complex logic allowed);
  • STATUS_ID - character indicating the issue status (complex logic allowed);
  • SUBJECT - the message subject (complex logic allowed);
  • FROM - the "from" field of the message (complex logic allowed);
  • TO - the "to" field of the message  (complex logic allowed);
  • BODY_TYPE - the type of the message body;
  • BODY - message body (complex logic allowed).
For example:
array("SUBJECT"=>"test | test", "TO"=>"@bitrixsoft.com")

Return Values

Returns an instance of the CDBResult class. The Issue object fields except those of the text type become available after calling one of the CDBResult methods.

In case of an error, the class variable LAST_ERROR contains the error description.

Example



$cPosting = new CPosting;
$arFilter = Array(
    "ID" => $find_id,
    "TIMESTAMP_1" => $find_timestamp_1, 
    "TIMESTAMP_2" => $find_timestamp_2, 
    "DATE_SENT_1" => $find_date_sent_1, 
    "DATE_SENT_2" => $find_date_sent_2, 
    "STATUS" => $find_status, 
    "STATUS_ID" => $find_status_id, 
    "SUBJECT" => $find_subject, 
    "FROM" => $find_from, 
    "TO" => $find_to,
    "BODY" => $find_body,
    "BODY_TYPE" => $find_body_type
);
$rsPosting = $cPosting->GetList(array($by=>$order), $arFilter);
$strError .= $cPosting->LAST_ERROR;

$rsPosting->NavStart(50);
echo $rsPosting->NavPrint("Issues");
while($rsPosting->NavNext(true, "f_"))
{
    //...
}