AddMultiple
boolean CTaskFiles::AddMultiple( $taskId, array $arFilesIds, array $arParams = array() );
This method attaches several files to a task.
Note: This method accepts an array of configuration parameters and generates scripts, necessary to show file dialog. Static method.
Method parameters
Parameter | Description |
---|---|
$taskId | Task ID. |
$arFilesIds | Array of attached files' IDs. |
$arParams | Array of parameters (optional argument).
Permissible parameters:
|
Returned value
Returns true, if all files were successfully attached to the task. Otherwise - false.
Examples of use
<?php CModule::IncludeModule('tasks'); $taskId = 235; $arFilesIds = array(34, 35, 36); $userId = 45; // Complete operation on behalf of another user if (!CTaskFiles::AddMultiple($taskId, $arFilesIds, array('USER_ID' => $userId)) ) AddMessage2Log('Error during file attaching to task ' . $taskId); ?>
© «Bitrix24», 2001-2024