Method | Description | Available from version |
getTypeName(): string | Returns string identifier for entity type (for example, DEAL for deals). | |
getTypeId(): int | Returns string identifier for entity type (for example, 2 for deals). | |
getStatusEntityId(): string | Returns entity ID for handling stages (table b_crm_status ). | |
getItemsSelectPreset(): array | Returns list of default fields for selecting from table with entity elements. | |
isCategoriesSupported(): bool | Returns true when entity type supports handling of pipelines. | |
isRestPlacementSupported(): bool | Returns true when entity type supports app embedding into Kanban. | |
isCustomPriceFieldsSupported(): bool | Returns true when entity type supports custom field for money amounts. | |
isInlineEditorSupported(): bool | Returns true when entity type supports quick element creation in kanban. | |
isEntitiesLinksInFilterSupported(): bool | Returns true when entity type supports fields with bindings to other entities in filter. | |
isOverdueFilterSupported(): bool | Returns true when entity type has checkbox "overdue" in filter. | |
isActivityCountersFilterSupported(): bool | Returns true when elements of this entity type can be filtered by counters. | |
isRecurringSupported(): bool | Returns true when entity type supports recurring feature. | |
hasOwnMultiFields(): bool | Returns true when entity type has its own custom multi fields. | |
isActivityCountersSupported(): bool | Returns true when entity type has counters. | |
isExclusionSupported(): bool | Returns true , when entity type supports adding to exception list. | |
isNeedToRunAutomation(): bool | Returns true when system must run automation after updating the entity element. | |
getCloseDateFieldName(): string | Returns the field, containing date when entity element was closed. | |
getEditorConfigId(): string | Returns string ID for settings of element universal editor. | |
hasOpenedField(): bool | Returns true when element of this entity type has the field "Available for all". | |
removeUserAdditionalSelectFields(): bool | Clears view detail settings for current user. | |
resetAdditionalSelectFields(bool $canEditCommon): bool | Clears view detail settings for all users.
Parameter | Description |
$canEditCommon | Indicates edit access permissions for general settings. |
| |
saveAdditionalFields(array $fields, string $type, bool $canEditCommon): bool | Saves view detail settings or edit quick form.
Parameter | Description |
$fields | Sets of fields. |
$type | - settings type. Can be view or edit . |
$canEditCommon | Indicates user access permissions for general settings edit. |
| |
getAdditionalSelectFields(): bool | Returns set of additional fields for retrieving entity elements from the database. | |
getAdditionalEditFields(): array | Returns additional fields for quick edit form. | |
getCustomPriceFieldName(): ?string | Returns additional field for storage of price amounts if specified. | |
getStageFieldName(): string | Returns field name storing stage ID for an element. | |
getInlineEditorParameters(): array | Returns array with editor settings for quick creation form. | |
getUserFields(): array | Returns descriptions for element custom fields of entity elements. | |
getRequiredFieldsByStages(array $stages): array | Returns set of required fields with key - field name and value - array with stage IDs, where this field is required.
Parameter | Description |
$stages | Array with stage description. |
| |
fillStageTotalSums(array $filter, array $runtime, array &$stages): void |
Parameter | Description |
$filter | Kanban filter. |
$runtime | Runtime-field for kanban filter. |
$stages | Stage description. |
Method completes final prices for stages.
-
count - number of elements
-
total - final price as a number
-
total_format - formatted string with final total price
| |
getItems(array $parameters): \CDBResult | Returns result for element retrieval.
Parameter | Description |
$parameters | Sets of parameters for a query. Similar to the array for the method DataManager::getList() . |
| |
prepareItemCommonFields(array $item): array | Prepares element field names to a "general" view.
Parameter | Description |
$item | Array with element fields. |
| |
deleteItems(array $ids, bool $isIgnore = false, \CCrmPerms $permissions = null): void | Deletes elements with identifiers $ids .
Parameter | Description |
$ids | Array with element IDs. |
$isIgnore | Add to exceptions list. |
$permissions | Access permissions. |
| |
getItem(int $id): ?array | Returns element description by its $id .
Parameter | Description |
$id | Element ID. |
| |
setItemsAssigned(array $ids, int $assignedId, \CCrmPerms $permissions): Result | Assigns new responsible user $assignedId for elements with ID - $ids .
Parameter | Description |
$ids | Array with element IDs. |
$assignedId | Responsible user ID. |
$permissions | Access permissions. |
| |
updateItemsOpened(array $ids, bool $isOpened): Result | Changes flag from "Available for all" for elements with ID $ids to $isOpened .
Parameter | Description |
$ids | Array with element IDs. |
$isOpened | Flag value "Available for all". |
| |
updateItemStage(int $id, string $stageId, array $newStateParams, array $stages): Result | Replaces element with ID $id to a stage with ID $stageId .
Parameter | Description |
$id | Element identifier. |
$stageId | New stage identifier. |
$newStateParams> | Array with additional moved for moving. |
$stages | Stage description. |
| |