GetList
CDBResult CTaskFiles::GetList( array arOrder = array(), array arFilter = array() );
Returns list of "task -> file" associations by the arFilter filter, sorted by the arOrder.
Note: This method accepts an array of configuration parameters and generates scripts, necessary 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:
|
arFilter | Array of the array("filetered field"=>"filter value" [, ...]) type.
Filtered field can have the following values:
"filter values" - single value or an array. Optional. By default, records are not filtered. |
Returned value
CDBResult object is returned.
Examples of use
<?
// Select all files for the task with ID = 2
if (CModule::IncludeModule("tasks"))
{
$res = CTaskFiles::GetList(
Array("FILES_ID" => "ASC"),
Array("TASK_ID" => "2")
);
while ($arFile = $res->GetNext())
{
echo $arFile["FILE_ID"]."<br>";
}
}
?>
© «Bitrix24», 2001-2024