PHP Class Bitrix24\Task\Item

Inheritance: extends Bitrix24\Bitrix24Entity
Exibir arquivo Open project: mesilov/bitrix24-php-sdk

Public Methods

Method Description
add ( array $taskData ) : array add new task
approve ( $taskId ) : array Change status of task waiting for confirmation to Completed.
complete ( $taskId ) : array Change status to Completed or Supposedly completed (requires creator's attention).
defer ( $taskId ) : array Change task status to Deferred
delegate ( $taskId, $userId ) : array Delegate task to a user.
delete ( $taskId ) : array Delete task.
disapprove ( $taskId ) : array Change status of task waiting for confirmation to Pending.
getAllowedActions ( $taskId ) : array Return array of allowed task actions IDs (see PHP class constants CTaskItem).
getAllowedTaskActionsAsStrings ( $taskId ) : array Return an array whose keys are acton names (the names correspond to PHP class constants CTaskItem) and values show whether the action is allowed (true) or not allowed (false).
getData ( $taskId ) : array Return array of task data fields (TITLE, DESCRIPTION, etc.)
getDependSon ( $taskId ) : array Return array with parent task IDs
getDescription ( $taskId, $format ) : array Return task description.
getFiles ( $taskId ) : array Return array of links to files attached to the task.
getManifest ( ) : array get all methods and fields of B24 entity CTaskItem. Only for information!
isActionAllowed ( $taskId, $actionId ) : array Return true if action is allowed, else returns false.
renew ( $taskId ) : array Change status to Pending.
startExecution ( $taskId ) : array Change task status to In Progress
update ( $taskId, $taskData ) : array Update task data. The following fields may be updated. Business logic and permissions are taken into account when updating task data.

Method Details

add() public method

add new task
public add ( array $taskData ) : array
$taskData array
return array new task ID

approve() public method

Change status of task waiting for confirmation to Completed.
public approve ( $taskId ) : array
$taskId integer Task ID
return array

complete() public method

Change status to Completed or Supposedly completed (requires creator's attention).
public complete ( $taskId ) : array
$taskId integer Task ID
return array

defer() public method

Change task status to Deferred
public defer ( $taskId ) : array
$taskId integer Task ID
return array

delegate() public method

Delegate task to a user.
public delegate ( $taskId, $userId ) : array
$taskId integer Task ID
$userId integer New responsible person ID
return array

delete() public method

Delete task.
public delete ( $taskId ) : array
$taskId integer Task ID.
return array

disapprove() public method

Change status of task waiting for confirmation to Pending.
public disapprove ( $taskId ) : array
$taskId integer Task ID
return array

getAllowedActions() public method

Return array of allowed task actions IDs (see PHP class constants CTaskItem).
public getAllowedActions ( $taskId ) : array
$taskId integer Task ID.
return array

getAllowedTaskActionsAsStrings() public method

Return an array whose keys are acton names (the names correspond to PHP class constants CTaskItem) and values show whether the action is allowed (true) or not allowed (false).
public getAllowedTaskActionsAsStrings ( $taskId ) : array
$taskId integer Task ID.
return array

getData() public method

Return array of task data fields (TITLE, DESCRIPTION, etc.)
public getData ( $taskId ) : array
$taskId
return array

getDependSon() public method

Return array with parent task IDs
public getDependSon ( $taskId ) : array
$taskId integer Task ID.
return array

getDescription() public method

Return task description.
public getDescription ( $taskId, $format ) : array
$taskId integer Task ID.
$format integer 1 (Corresponds to the PHP constant CTaskItem::DESCR_FORMAT_RAW) � description will be returned in the format it is stored in the database (HTML or BB-code), will not be sanitized; 2 (Corresponds to the PHP constant CTaskItem::DESCR_FORMAT_HTML) � description will be returned in HTML, will first be sanitized (if included in task module settings); 3 (Corresponds to the PHP constant CTaskItem::DESCR_FORMAT_PLAIN_TEXT) � description will be returned as plain text (no HTML tags).
return array

getFiles() public method

Return array of links to files attached to the task.
public getFiles ( $taskId ) : array
$taskId integer Task ID.
return array

getManifest() public method

get all methods and fields of B24 entity CTaskItem. Only for information!
public getManifest ( ) : array
return array

isActionAllowed() public method

Return true if action is allowed, else returns false.
public isActionAllowed ( $taskId, $actionId ) : array
$taskId integer Task ID.
$actionId integer Validated action ID (see CTaskItem::ACTION_* constants of PHP class CTaskItem).
return array

renew() public method

Change status to Pending.
public renew ( $taskId ) : array
$taskId integer Task ID
return array

startExecution() public method

Change task status to In Progress
public startExecution ( $taskId ) : array
$taskId integer Task ID
return array

update() public method

Update task data. The following fields may be updated. Business logic and permissions are taken into account when updating task data.
public update ( $taskId, $taskData ) : array
$taskId integer Task ID.
$taskData array List of updated fields.
return array