Bitrix API

ItemChecklistFacade extends CheckListFacade

Class CheckListFacade

Table of Contents

Constants

ACTION_ADD  = 0x1
ACTION_MODIFY  = 0x2
ACTION_REMOVE  = 0x3
ACTION_REORDER  = 0x5
ACTION_TOGGLE  = 0x4
ACTIONS  = ['COMMON' => [self::ACTION_ADD => 'ACTION_ADD', self::ACTION_REORDER => 'ACTION_REORDER'], 'ITEM' => [self::ACTION_MODIFY => 'ACTION_MODIFY', self::ACTION_REMOVE => 'ACTION_REMOVE', self::ACTION_TOGGLE => 'ACTION_TOGGLE']]
MEMBER_ACCOMPLICE  = 'A'
MEMBER_AUDITOR  = 'U'
MOVING_POSITION_AFTER  = 'after'
MOVING_POSITION_BEFORE  = 'before'
TASK_ADD_CONTEXT  = 'TASK_ADD'

Properties

$commonAccessActions  : mixed
$currentAccessAction  : mixed
$entityIdName  : mixed
$itemAccessActions  : mixed
$oldItemsToMerge  : mixed
$userFieldsEntityIdName  : mixed

Methods

add()  : Result
addAttachmentByContent()  : Result
Attaches file represented by base64 content to checklist.
addAttachmentsFromDisk()  : Result
Attaches file from bitrix24 disk to checklist.
addMembers()  : Result
Adds members to checklist.
checkAccess()  : mixed
checkFieldsForAdd()  : Result
Checks fields before adding checklist.
checkFieldsForUpdate()  : Result
Checks fields before updating checklist.
complete()  : Result
Completes checklist.
completeAll()  : Result
Completes all checklists recursively starting from $checkList.
delete()  : Result|bool
deleteByEntityId()  : mixed
Deletes all checklists of entity.
deleteByEntityIdOnLowLevel()  : mixed
Deletes all checklists of entity.
deleteComposite()  : Result
deleteLeaf()  : Result
doAddPostActions()  : mixed
Does some actions after adding checklist.
doDeletePostActions()  : mixed
Does some actions after deleting checklists.
doMergePostActions()  : mixed
Does some actions after merging checklists.
doMergePreActions()  : mixed
Does some actions before merging checklists.
doUpdatePostActions()  : mixed
Does some actions after updating checklist.
fillActionsForItems()  : mixed
getArrayStructuredRoots()  : array<string|int, mixed>
Returns array of roots with subtrees as array structures.
getByEntityId()  : array<string|int, mixed>
getCheckListDataController()  : string
Returns table class for checklist table.
getCheckListMemberDataController()  : string
Returns table class for checklist member table.
getCheckListTree()  : string
Returns class that extends abstract class CheckListTree
getCheckListTreeDataController()  : string
Returns table class for checklist tree table.
getFieldsForTable()  : array<string|int, mixed>
Returns array of fields suitable for table data adding or updating.
getItemsForEntity()  : array<string|int, mixed>
Returns checklists with actions for entity if entity is accessible for reading.
getList()  : array<string|int, mixed>
getObjectStructuredRoots()  : array<string|int, mixed>
Returns array of roots with subtrees as object structures.
isActionAllowed()  : bool
Checks if action is allowed for user and entity.
logError()  : mixed
Logs error message.
merge()  : Result
Sets new checklists for entity by merging with old ones (runs through $newItems, adds completely new to entity, detects differences and changes inner data of changed checklists, deletes all old checklists it did not traverse through).
moveItem()  : Result
Moves item before or after another item depending on position.
removeAttachments()  : Result
Removes attachments from checklist.
removeMembers()  : Result
Removes members from checklist.
renew()  : Result
Renews checklist.
update()  : Result
updateComposite()  : Result

Constants

ACTIONS

public mixed ACTIONS = ['COMMON' => [self::ACTION_ADD => 'ACTION_ADD', self::ACTION_REORDER => 'ACTION_REORDER'], 'ITEM' => [self::ACTION_MODIFY => 'ACTION_MODIFY', self::ACTION_REMOVE => 'ACTION_REMOVE', self::ACTION_TOGGLE => 'ACTION_TOGGLE']]

MOVING_POSITION_BEFORE

public mixed MOVING_POSITION_BEFORE = 'before'

Properties

$userFieldsEntityIdName

public static mixed $userFieldsEntityIdName = ''

Methods

add()

public static add(int $entityId, int $userId, array<string|int, mixed> $fields) : Result
Parameters
$entityId : int
$userId : int
$fields : array<string|int, mixed>
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

addAttachmentByContent()

Attaches file represented by base64 content to checklist.

public static addAttachmentByContent(int $entityId, int $userId, CheckList $checkList, array<string|int, mixed> $attachmentParameters) : Result

This function uploads file on bitrix24 disk before attaching.

Parameters
$entityId : int
$userId : int
$checkList : CheckList
$attachmentParameters : array<string|int, mixed>
  • consists of NAME => (string)$name and CONTENT => (base64)$content
Return values
Result

addAttachmentsFromDisk()

Attaches file from bitrix24 disk to checklist.

public static addAttachmentsFromDisk(int $entityId, int $userId, CheckList $checkList, array<string|int, mixed> $filesIds) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
$filesIds : array<string|int, mixed>
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

addMembers()

Adds members to checklist.

public static addMembers(int $entityId, int $userId, CheckList $checkList, mixed $members) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
$members : mixed
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

checkAccess()

public static checkAccess(mixed $entityId, mixed $userId, mixed $action[, mixed $params = null ]) : mixed
Parameters
$entityId : mixed
$userId : mixed
$action : mixed
$params : mixed = null

checkFieldsForAdd()

Checks fields before adding checklist.

public static checkFieldsForAdd(array<string|int, mixed> $fields) : Result
Parameters
$fields : array<string|int, mixed>
Return values
Result

checkFieldsForUpdate()

Checks fields before updating checklist.

public static checkFieldsForUpdate(array<string|int, mixed> $fields) : Result
Parameters
$fields : array<string|int, mixed>
Return values
Result

complete()

Completes checklist.

public static complete(int $entityId, int $userId, CheckList $checkList) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

completeAll()

Completes all checklists recursively starting from $checkList.

public static completeAll(int $entityId, int $userId, CheckList $checkList) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException
Return values
Result

delete()

public static delete(int $entityId, int $userId, CheckList $checkList) : Result|bool
Parameters
$entityId : int
$userId : int
$checkList : CheckList
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException
Return values
Result|bool

deleteByEntityId()

Deletes all checklists of entity.

public static deleteByEntityId(int $entityId, int $userId) : mixed

Works much slower than deleteByEntityIdOnLowLevel because of recursion, but checks rights and does post actions.

Parameters
$entityId : int
$userId : int
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException

deleteByEntityIdOnLowLevel()

Deletes all checklists of entity.

public static deleteByEntityIdOnLowLevel(int $entityId) : mixed

Works much faster than deleteByEntityId. This function doesn't check rights and doesn't do post actions.

Parameters
$entityId : int
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException

deleteComposite()

public static deleteComposite(int $entityId, int $userId, CheckList $checkList) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectPropertyException
throws
SystemException
Return values
Result

deleteLeaf()

public static deleteLeaf(int $entityId, int $userId, CheckList $checkList) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException
throws
ObjectPropertyException
throws
Exception
Return values
Result

doAddPostActions()

Does some actions after adding checklist.

public static doAddPostActions(int $entityId, int $userId, CheckList $checkList) : mixed
Parameters
$entityId : int
$userId : int
$checkList : CheckList

doDeletePostActions()

Does some actions after deleting checklists.

public static doDeletePostActions(int $entityId, int $userId[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
$entityId : int
$userId : int
$data : array<string|int, mixed> = []

doMergePostActions()

Does some actions after merging checklists.

public static doMergePostActions(int $entityId, int $userId[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
$entityId : int
$userId : int
$data : array<string|int, mixed> = []

doMergePreActions()

Does some actions before merging checklists.

public static doMergePreActions(int $entityId, int $userId[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
$entityId : int
$userId : int
$data : array<string|int, mixed> = []

doUpdatePostActions()

Does some actions after updating checklist.

public static doUpdatePostActions(int $entityId, int $userId, CheckList $oldCheckList, CheckList $newCheckList) : mixed
Parameters
$entityId : int
$userId : int
$oldCheckList : CheckList
$newCheckList : CheckList

fillActionsForItems()

public static fillActionsForItems(mixed $itemId, mixed $userId, mixed $items) : mixed
Parameters
$itemId : mixed
$userId : mixed
$items : mixed

getArrayStructuredRoots()

Returns array of roots with subtrees as array structures.

public static getArrayStructuredRoots(array<string|int, mixed> $sourceArray[, string $keyToParent = 'PARENT_ID' ]) : array<string|int, mixed>
Parameters
$sourceArray : array<string|int, mixed>
$keyToParent : string = 'PARENT_ID'
Return values
array<string|int, mixed>

getByEntityId()

public static getByEntityId(mixed $itemId) : array<string|int, mixed>
Parameters
$itemId : mixed
Return values
array<string|int, mixed>

getCheckListDataController()

Returns table class for checklist table.

public static getCheckListDataController() : string
Return values
string

getCheckListMemberDataController()

Returns table class for checklist member table.

public static getCheckListMemberDataController() : string
Return values
string

getCheckListTree()

Returns class that extends abstract class CheckListTree

public static getCheckListTree() : string
Tags
see
CheckListTree
Return values
string

getCheckListTreeDataController()

Returns table class for checklist tree table.

public static getCheckListTreeDataController() : string
Return values
string

getFieldsForTable()

Returns array of fields suitable for table data adding or updating.

public static getFieldsForTable(mixed $fields) : array<string|int, mixed>
Parameters
$fields : mixed
Return values
array<string|int, mixed>

getItemsForEntity()

Returns checklists with actions for entity if entity is accessible for reading.

public static getItemsForEntity(mixed $itemId, mixed $userId) : array<string|int, mixed>
Parameters
$itemId : mixed
$userId : mixed
Return values
array<string|int, mixed>

getList()

public static getList([array<string|int, mixed> $select = [] ][, array<string|int, mixed> $filter = [] ][, array<string|int, mixed> $order = [] ]) : array<string|int, mixed>
Parameters
$select : array<string|int, mixed> = []
$filter : array<string|int, mixed> = []
$order : array<string|int, mixed> = []
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException
Return values
array<string|int, mixed>

getObjectStructuredRoots()

Returns array of roots with subtrees as object structures.

public static getObjectStructuredRoots(array<string|int, mixed> $items, int $entityId, int $userId[, string $keyToParent = 'PARENT_ID' ]) : array<string|int, mixed>
Parameters
$items : array<string|int, mixed>
$entityId : int
$userId : int
$keyToParent : string = 'PARENT_ID'
Tags
throws
NotImplementedException
Return values
array<string|int, mixed>

isActionAllowed()

Checks if action is allowed for user and entity.

public static isActionAllowed(int $entityId, CheckList|null $checkList, int $userId, mixed $actionId) : bool
Parameters
$entityId : int
$checkList : CheckList|null
$userId : int
$actionId : mixed
Return values
bool

logError()

Logs error message.

public static logError(string $message) : mixed
Parameters
$message : string

merge()

Sets new checklists for entity by merging with old ones (runs through $newItems, adds completely new to entity, detects differences and changes inner data of changed checklists, deletes all old checklists it did not traverse through).

public static merge(int $entityId, int $userId, array<string|int, mixed> $newItems[, array<string|int, mixed> $parameters = [] ]) : Result
Parameters
$entityId : int
$userId : int
$newItems : array<string|int, mixed>
$parameters : array<string|int, mixed> = []
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
SystemException
Return values
Result

moveItem()

Moves item before or after another item depending on position.

public static moveItem(int $entityId, int $userId, CheckList $itemToMove, int $relatedItemId[, string $position = self::MOVING_POSITION_AFTER ]) : Result
Parameters
$entityId : int
$userId : int
$itemToMove : CheckList
$relatedItemId : int
$position : string = self::MOVING_POSITION_AFTER
Tags
throws
ArgumentException
throws
NotImplementedException
throws
SystemException
Return values
Result

removeAttachments()

Removes attachments from checklist.

public static removeAttachments(int $entityId, int $userId, CheckList $checkList, array<string|int, mixed> $attachmentsIds) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
$attachmentsIds : array<string|int, mixed>
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

removeMembers()

Removes members from checklist.

public static removeMembers(int $entityId, int $userId, CheckList $checkList, mixed $membersIds) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
$membersIds : mixed
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

renew()

Renews checklist.

public static renew(int $entityId, int $userId, CheckList $checkList) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

update()

public static update(int $entityId, int $userId, CheckList $checkList, mixed $fields) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
$fields : mixed
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

updateComposite()

public static updateComposite(int $entityId, int $userId, CheckList $checkList, array<string|int, mixed> $fields) : Result
Parameters
$entityId : int
$userId : int
$checkList : CheckList
$fields : array<string|int, mixed>
Tags
throws
ArgumentException
throws
NotImplementedException
throws
ObjectException
throws
ObjectPropertyException
throws
SqlQueryException
throws
SystemException
Return values
Result

        
On this page

Search results