Documentation

Add

int
CTaskElapsedTime::Add(
 array arFields,
 array arParams = array()
);

This method adds the elapsed time to a task.

Method parameters

Parameter Description Available from version
arFields Array("field"=>"value", ...). 
arParams Array of additional parameters. Optional.

Returned value

This method returns ID of the added record, if adding was sucessful. When an error occurs, the method will return false, and exceptions will contain the errors. 

Examples of use

<?
if (CModule::IncludeModule("tasks"))
{
$arFields = array(
"USER_ID" => 2,
"TASK_ID" => 16,
"MINUTES" => 90,
"COMMENT_TEXT" => "Added hour and a half."
);
$obElapsed = new CTaskElapsedTime();
$obElapsed->Add($arFields);
}?>


© «Bitrix24», 2001-2024