GetList
CDBResult CTaskTemplates::GetList( array arOrder = array(), array arFilter = array(), array arNavParams = array(), array arParams = array(), array arSelect = array() );
Returns list of templates by the arFilter filter, sorted in the arOrder direction.
Note: The method accepts an array of configuration parameters and generates scripts, necessary to show file dialog. Static method.
Method parameters
Parameter | Description | Available from version |
---|---|---|
arOrder | Array for results sorting. Array of array("sorting field"=>"sorting direction" [, ...]) type.
Field for sorting can have the following values:
| |
arFilter | Array of the array("filtered field"=>"filter value" [, ...]). Filtered field can have the following values:
"filter values" - single value or an array. Optional. By default, records are not filtered. | |
arNavParams | Array of parameters for page-by-page navigation. Optional. | |
arParams | Array of additional parameters. Accepts the USER_ID key with specified user ID, on behalf of which the access permission rights will be verified when selecting task templates. Optional. | |
arSelect | Array of selected fields. If an empty array is specified (by default) - then all fields will be selected. Optional. |
Returned value
CDBResult object is returned.
Examples of use
<?
// Select all templates for user with ID = 2
if (CModule::IncludeModule("tasks"))
{
$res = CTaskTemplates::GetList(
Array("TITLE" => "ASC"),
Array("RESPONSIBLE" => "2")
);
while ($arTemplate = $res->GetNext())
{
echo "Template name: ".$arTemplate["TITLE"]."<br>";
}
}
?>
© «Bitrix24», 2001-2024