Documentation

GetList

CDBResult
CTaskLog::GetList(
 array arOrder = array(),
 array arFilter = array()
);

Returns list of records from history of updates for a task by the arFilter filter, sorted in the arOrder direction.

Note: Method accepts an array of configuration parameters and generates scripts, necessesary to show file dialog. Static method.

Method parameters

Parameter Description
arOrder Array for result sorting. Array of the array("sorting field"=>"sorting direction" [, ...]) type.
Field for sorting can have the following values:
  • USER - User ID;
  • FIELD - Updated field. 
Direction of sorting can have the following values:
  • asc - by ascension;
  • desc - by descension;
  Optional. By default it is filtered by ascension of the date when added.
arFilter Array of the array("filtered field"=>"fiter value" [, ...]) type. Filtered field can have the following values:
  • TASK_ID - Task ID;
  • USER_ID - User ID;
  • CREATED_DATE - Date when added; 
  • FIELD - modified field.
Type of filtration can be specified in front of the filtered field:
  • "!" - not equal
  • "<" - less
  • "<=" - less or equal
  • ">" - more
  • ">=" - more or equal

"filter values" - single value or an array.

Optional. Be default, records are not filtered.

Returned value

CDBResult object is returned . 

Examples of use

<?

// Select all the log record for the task with ID = 2
if (CModule::IncludeModule("tasks"))
{
$res = CTaskLog::GetList(
Array(),
Array("TASK_ID" => "2")
);

while ($arLog = $res->GetNext())
{
echo "Date when updated: ".$arLog["CREATED_DATE"]." Field: ".$arLog["FIELD"]."<br>";
}
}

?>


© «Bitrix24», 2001-2024
Up