Bitrix API

Task extends Base

The layer fow work with tasks.

Table of Contents

Constants

DESC_FORMAT_HTML  = \CTaskItem::DESCR_FORMAT_HTML
DESC_FORMAT_PLAIN_TEXT  = \CTaskItem::DESCR_FORMAT_PLAIN_TEXT
DESC_FORMAT_RAW  = \CTaskItem::DESCR_FORMAT_RAW
TASK_COPY_ERROR  = "TASK_COPY_ERROR"

Methods

__construct()  : mixed
add()  : bool|int
Creates task and return task id.
copyChildren()  : Result
Starts copying children entities.
getErrors()  : array<string|int, Error>
getFields()  : array<string|int, mixed>
Returns task fields.
getList()  : bool|CDBResult
Returns query object.
getTaskItemObject()  : CTaskItem
Returns CTaskItem object.
prepareFieldsToCopy()  : array<string|int, mixed>
Preparing data before creating a new entity.
setCommentCopier()  : void
setExecutiveUserId()  : void
To copy on agent need user id.
setParamsCopier()  : void
setProjectTerm()  : mixed
Setting the start date of a project or a group to update deadline in tasks.
setTargetGroupId()  : void
Writes the ID of the target group to copy the task to the specified group.
setTaskCopier()  : void
To copy child tasks needs task copier.
setTemplateCopier()  : void
To copy the task recurrence setting, you need to copy the template.
setTopicCopier()  : void
setUfIgnoreList()  : void
To avoid copying specific fields, specify a list of fields to ignore.
setUserFieldManager()  : mixed
To copy uf fields, you must pass the uf field manager.
update()  : bool
Updates task.
updateAttachedIdsInText()  : void
Updates identifiers who's added to text.

Constants

DESC_FORMAT_HTML

public mixed DESC_FORMAT_HTML = \CTaskItem::DESCR_FORMAT_HTML

DESC_FORMAT_PLAIN_TEXT

public mixed DESC_FORMAT_PLAIN_TEXT = \CTaskItem::DESCR_FORMAT_PLAIN_TEXT

DESC_FORMAT_RAW

public mixed DESC_FORMAT_RAW = \CTaskItem::DESCR_FORMAT_RAW

TASK_COPY_ERROR

public mixed TASK_COPY_ERROR = "TASK_COPY_ERROR"

Methods

__construct()

public __construct(mixed $executiveUserId) : mixed
Parameters
$executiveUserId : mixed

add()

Creates task and return task id.

public add(Container $container, array<string|int, mixed> $fields) : bool|int
Parameters
$container : Container
$fields : array<string|int, mixed>

The task fields.

Return values
bool|int

copyChildren()

Starts copying children entities.

public copyChildren(Container $container, int $entityId, int $copiedEntityId) : Result
Parameters
$container : Container
$entityId : int

Task id.

$copiedEntityId : int

Copied task id.

Return values
Result

getErrors()

public getErrors() : array<string|int, Error>
Return values
array<string|int, Error>

getFields()

Returns task fields.

public getFields(Container $container, int $entityId) : array<string|int, mixed>
Parameters
$container : Container
$entityId : int
Return values
array<string|int, mixed>

$fields

getList()

Returns query object.

public getList([array<string|int, mixed> $order = [] ][, array<string|int, mixed> $filter = [] ][, array<string|int, mixed> $select = [] ]) : bool|CDBResult
Parameters
$order : array<string|int, mixed> = []
$filter : array<string|int, mixed> = []
$select : array<string|int, mixed> = []
Return values
bool|CDBResult

getTaskItemObject()

Returns CTaskItem object.

public getTaskItemObject(int $taskId) : CTaskItem
Parameters
$taskId : int

Task id.

Return values
CTaskItem

prepareFieldsToCopy()

Preparing data before creating a new entity.

public prepareFieldsToCopy(Container $container, array<string|int, mixed> $fields) : array<string|int, mixed>
Parameters
$container : Container
$fields : array<string|int, mixed>

List entity fields.

Return values
array<string|int, mixed>

$fields

setExecutiveUserId()

To copy on agent need user id.

public setExecutiveUserId(int $executiveUserId) : void
Parameters
$executiveUserId : int

setProjectTerm()

Setting the start date of a project or a group to update deadline in tasks.

public setProjectTerm(array<string|int, mixed> $projectTerm) : mixed
Parameters
$projectTerm : array<string|int, mixed>

["start_point" => "", "end_point" => ""].

setTargetGroupId()

Writes the ID of the target group to copy the task to the specified group.

public setTargetGroupId(int $targetGroupId) : void
Parameters
$targetGroupId : int

setTaskCopier()

To copy child tasks needs task copier.

public setTaskCopier(Task $taskCopier) : void
Parameters
$taskCopier : Task

Task copier.

setTemplateCopier()

To copy the task recurrence setting, you need to copy the template.

public setTemplateCopier(Template|null $templateCopier) : void
Parameters
$templateCopier : Template|null

setUfIgnoreList()

To avoid copying specific fields, specify a list of fields to ignore.

public setUfIgnoreList(array<string|int, mixed> $ufIgnoreList) : void
Parameters
$ufIgnoreList : array<string|int, mixed>

Ignore list.

setUserFieldManager()

To copy uf fields, you must pass the uf field manager.

public setUserFieldManager(CUserTypeManager $userTypeManager) : mixed
Parameters
$userTypeManager : CUserTypeManager

Uf fields.

update()

Updates task.

public update(int $taskId, array<string|int, mixed> $fields) : bool
Parameters
$taskId : int

Task Id.

$fields : array<string|int, mixed>

The task fields.

Return values
bool

updateAttachedIdsInText()

Updates identifiers who's added to text.

public updateAttachedIdsInText(int $id, array<string|int, mixed> $attachedIds, callable $auxiliaryCallback) : void
Parameters
$id : int

Id of the entity whose text will be updated.

$attachedIds : array<string|int, mixed>
$auxiliaryCallback : callable

        
On this page

Search results