Bitrix API

Quote extends Factory

Table of Contents

Methods

__construct()  : mixed
checkIfTotalItemsCountExceeded()  : bool
clearCategoriesCache()  : self
clearFieldsCollectionCache()  : self
clearItemCategoryCache()  : void
clearItemStageCache()  : void
clearUserFieldsInfoCache()  : mixed
createCategory()  : Category
Creates new category.
createDefaultCategoryIfNotExist()  : Category
Get default category if it exists.
createItem()  : Item
Creates new Item for this entity.
getAddOperation()  : Add
Returns add operation for this entity.
getCategories()  : array<string|int, Category>
Returns array of categories for this entity.
getCategory()  : Category|null
Returns category by id.
getCategoryByCode()  : Category|null
Returns category by specified unique code.
getCategoryFieldsInfo()  : array<string|int, mixed>
getCommonFieldNameByMap()  : string
Replaces entity-specific name with common Item field name (Item::FIELD_NAME_*) if it's needed
getConversionOperation()  : Conversion
getCopyOperation()  : Copy
Returns a configured Operation\Copy instance
getCountersSettings()  : EntityCounterSettings
Return actual counters settings.
getDataClass()  : string
getDefaultCategory()  : Category|null
Returns default category of current entity if it exists.
getDeleteOperation()  : Delete
Returns delete operation for this entity
getDependantFieldsMap()  : array<string|int, mixed>
getEditorAdapter()  : EditorAdapter
getEntityAbbreviation()  : string
Returns abbreviation for this entity
getEntityDescription()  : string
Returns human-readable language specific description for this entity
getEntityDescriptionInPlural()  : string
Return human-readable language specific description for category of items of this entity.
getEntityFieldNameByMap()  : string
Replaces common Item field name (Item::FIELD_NAME_*) with entity-specific name if it's needed
getEntityName()  : string
Returns name of this entity
getEntityTypeId()  : int
Returns entityTypeId for this factory.
getFieldCaption()  : string
Returns language-specific title of $commonFieldName. If not title is not found, returns $commonFieldName
getFieldsCollection()  : Collection
Returns collection of all fields of this entity type. (Even those, that are not visible for current user).
getFieldsInfo()  : array<string|int, mixed>
Returns data about item fields with titles.
getFieldsInfoByMap()  : array<string|int, mixed>
Returns data about item fields with fields map applied
getFieldsMap()  : array<string|int, string>
Returns map of common field names that have entity-specific name for the entity
getFieldsSettings()  : array<string|int, mixed>
getFieldValueCaption()  : string
getImportOperation()  : Import
getItem()  : Item|null
Returns Item by $id. Contacts, products and observers are selected by default
getItemByEntityObject()  : Item
getItemCategory()  : Category|null
Return category of the item with $id.
getItemCategoryId()  : int|null
Return category identifier of the item with $id.
getItems()  : array<string|int, Item>
Returns collection of items defined by $parameters, where $parameters - array of the same structure as in DataManager::getList()
getItemsCount()  : int
Returns number of items filtered by $filter.
getItemsCountFilteredByPermissions()  : int
Returns number of items filtered by $filter with additional filter by permissions.
getItemsFilteredByPermissions()  : array<string|int, mixed>
Method performs getList with additional filter by users permissions.
getItemStageId()  : string|null
getRestoreOperation()  : Restore
getStage()  : EO_Status|null
getStages()  : EO_Status_Collection
Returns stages for $categoryId.
getStageSemantics()  : string|null
Returns semantics of a stage with $stageId Returns null if the stage is not found
getStagesEntityId()  : string|null
Returns ENTITY_ID value for b_crm_status table.
getSuccessfulStage()  : EO_Status|null
getTrackedObject()  : TrackedObject
Returns TrackedObject, specific for this entity
getUpdateOperation()  : Update
Returns update operations for this entity.
getUserFieldEntityId()  : string
Returns ENTITY_ID for user fields.
getUserFields()  : array<string|int, mixed>
Returns all user fields of this entity type. (Even those, that are not visible for current user).
getUserFieldsInfo()  : array<string|int, mixed>
Returns fields info of all user fields of this entity type. (Even those, that are not visible for current user).
isAutomationEnabled()  : bool
Returns true if this entity supported by automation.
isBeginCloseDatesEnabled()  : bool
Returns true if this entity supports 'Begin Date' and 'Close Date' for its elements
isBizProcEnabled()  : bool
Returns true if this entity supported by business processes designer.
isCategoriesEnabled()  : bool
Returns true if this entity supports categories and they enabled in interfaces.
isCategoriesSupported()  : bool
Returns true if this entity supports categories.
isCategoryAvailable()  : bool
Returns true if the category with the provided $categoryId is available for usage (is not locked or restricted)
isCategoryExists()  : bool
isClientEnabled()  : bool
Returns true if this entity supports 'Client' field for its elements
isCommunicationRoutingSupported()  : bool
isCountersEnabled()  : bool
Returns true if this entity supports counters.
isCrmTrackingEnabled()  : bool
Returns true if this entity supports Crm Tracking
isDeferredCleaningEnabled()  : bool
Returns true if after item deletion data that was linked to the item is deleted on agent by default
isDocumentGenerationEnabled()  : bool
Returns true if this entity supports integration with 'documentgenerator' module
isFieldExists()  : bool
isInCustomSection()  : bool
isInventoryManagementEnabled()  : bool
Return true if inventory management is enabled for this entity.
isLastActivityEnabled()  : bool
Returns true if 'last activity' functionality is enabled in UI
isLastActivitySupported()  : bool
Returns true if this entity supports LAST_ACTIVITY_* fields and all associated logic
isLinkWithProductsEnabled()  : bool
Returns true if this entity supports links with Catalog products
isMultiFieldsEnabled()  : bool
Return true if this entity has own multi fields.
isMultipleAssignedEnabled()  : bool
Returns true if this entity supports multiple assigned.
isMyCompanyEnabled()  : bool
Returns true if this entity supports 'My Company' field for its elements
isNewRoutingForAutomationEnabled()  : bool
Return true if urls for automation page of this entity should be routed by common templates
isNewRoutingForDetailEnabled()  : bool
Return true if urls for detail pages of this entity should be routed by common templates
isNewRoutingForListEnabled()  : bool
Return true if urls for list pages of this entity should be routed by common templates
isObserversEnabled()  : bool
Returns true if this entity supports OBSERVERS field.
isPaymentsEnabled()  : bool
Return true if payments procession is enabled for this entity.
isRecyclebinEnabled()  : bool
Returns true if this entity supports recycle bin.
isSmartActivityNotificationEnabled()  : bool
isSmartActivityNotificationSupported()  : bool
isSourceEnabled()  : bool
Returns true if this entity supports 'SOURCE_ID' and 'SOURCE_DESCRIPTION' fields for its elements
isStagesEnabled()  : bool
isStagesSupported()  : bool
Returns true if this entity supports stages.
isUseInUserfieldEnabled()  : bool
Returns true if this entity can be used in user field type 'crm'.
purgeStagesCache()  : Factory
setStartStageIdPermittedForUser()  : string|null
Set first available stage of $item for user with $userId.

Methods

__construct()

public __construct() : mixed

checkIfTotalItemsCountExceeded()

public checkIfTotalItemsCountExceeded(int $limit[, array<string|int, mixed> $filter = [] ]) : bool
Parameters
$limit : int
$filter : array<string|int, mixed> = []
Return values
bool

clearCategoriesCache()

public clearCategoriesCache() : self
Return values
self

clearFieldsCollectionCache()

public clearFieldsCollectionCache() : self
Return values
self

clearItemCategoryCache()

public clearItemCategoryCache(int $id) : void
Parameters
$id : int

clearItemStageCache()

public clearItemStageCache(int $id) : void
Parameters
$id : int

clearUserFieldsInfoCache()

public clearUserFieldsInfoCache() : mixed

createCategory()

Creates new category.

public createCategory([array<string|int, mixed> $data = [] ]) : Category
Parameters
$data : array<string|int, mixed> = []

. Initial data for created category.

Tags
inheritDoc
Return values
Category

createDefaultCategoryIfNotExist()

Get default category if it exists.

public createDefaultCategoryIfNotExist() : Category

Creates new default category if there is none and returns it.

Tags
throws
InvalidOperationException
Return values
Category

createItem()

Creates new Item for this entity.

public createItem([array<string|int, mixed> $data = [] ]) : Item
Parameters
$data : array<string|int, mixed> = []
Return values
Item

getAddOperation()

Returns add operation for this entity.

public getAddOperation(Item $item[, Context|null $context = null ]) : Add
Parameters
$item : Item
$context : Context|null = null
Return values
Add

getCategories()

Returns array of categories for this entity.

public getCategories() : array<string|int, Category>
Return values
array<string|int, Category>

getCategory()

Returns category by id.

public getCategory(int $id) : Category|null
Parameters
$id : int
Return values
Category|null

getCategoryByCode()

Returns category by specified unique code.

public getCategoryByCode(string $code) : Category|null
Parameters
$code : string
Return values
Category|null

getCategoryFieldsInfo()

public getCategoryFieldsInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCommonFieldNameByMap()

Replaces entity-specific name with common Item field name (Item::FIELD_NAME_*) if it's needed

public getCommonFieldNameByMap(string $entityFieldName) : string
Parameters
$entityFieldName : string
Tags
see
Item
Return values
string

getCopyOperation()

Returns a configured Operation\Copy instance

public getCopyOperation(Item $item[, Context|null $context = null ]) : Copy
Parameters
$item : Item
$context : Context|null = null
Return values
Copy

getDataClass()

public getDataClass() : string
Tags
inheritDoc
Return values
string

getDefaultCategory()

Returns default category of current entity if it exists.

public getDefaultCategory() : Category|null
Return values
Category|null

getDeleteOperation()

Returns delete operation for this entity

public getDeleteOperation(Item $item[, Context $context = null ]) : Delete
Parameters
$item : Item
$context : Context = null
Return values
Delete

getDependantFieldsMap()

public getDependantFieldsMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEntityAbbreviation()

Returns abbreviation for this entity

public getEntityAbbreviation() : string
Return values
string

getEntityDescription()

Returns human-readable language specific description for this entity

public getEntityDescription() : string
Return values
string

getEntityDescriptionInPlural()

Return human-readable language specific description for category of items of this entity.

public getEntityDescriptionInPlural() : string
Return values
string

getEntityFieldNameByMap()

Replaces common Item field name (Item::FIELD_NAME_*) with entity-specific name if it's needed

public getEntityFieldNameByMap(string $commonFieldName) : string
Parameters
$commonFieldName : string
Tags
see
Item
Return values
string

getEntityName()

Returns name of this entity

public getEntityName() : string
Return values
string

getEntityTypeId()

Returns entityTypeId for this factory.

public getEntityTypeId() : int
Tags
inheritDoc
Return values
int

getFieldCaption()

Returns language-specific title of $commonFieldName. If not title is not found, returns $commonFieldName

public getFieldCaption(string $commonFieldName) : string
Parameters
$commonFieldName : string
Return values
string

getFieldsCollection()

Returns collection of all fields of this entity type. (Even those, that are not visible for current user).

public getFieldsCollection() : Collection
Return values
Collection

getFieldsInfo()

Returns data about item fields with titles.

public getFieldsInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFieldsInfoByMap()

Returns data about item fields with fields map applied

public getFieldsInfoByMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFieldsMap()

Returns map of common field names that have entity-specific name for the entity

public getFieldsMap() : array<string|int, string>
Tags
inheritDoc
Return values
array<string|int, string>

commonFieldName => entityFieldName

getFieldsSettings()

public getFieldsSettings() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getFieldValueCaption()

public getFieldValueCaption(string $commonFieldName, mixed $fieldValue) : string
Parameters
$commonFieldName : string
$fieldValue : mixed
Return values
string

getImportOperation()

public getImportOperation(Item $item[, Context $context = null ]) : Import
Parameters
$item : Item
$context : Context = null
Return values
Import

getItem()

Returns Item by $id. Contacts, products and observers are selected by default

public getItem(int $id[, array<string|int, mixed> $fieldsToSelect = ['*'] ]) : Item|null
Parameters
$id : int
$fieldsToSelect : array<string|int, mixed> = ['*']

Fields to select. All fields by default.

Return values
Item|null

getItemCategory()

Return category of the item with $id.

public getItemCategory(int $id) : Category|null
Parameters
$id : int
  • Item identifier.
Return values
Category|null

getItemCategoryId()

Return category identifier of the item with $id.

public getItemCategoryId(int $id) : int|null

If categories are not supported - returns 0. If no item - returns null.

Parameters
$id : int
  • Item identifier.
Return values
int|null

getItems()

Returns collection of items defined by $parameters, where $parameters - array of the same structure as in DataManager::getList()

public getItems([array<string|int, mixed> $parameters = [] ]) : array<string|int, Item>
Parameters
$parameters : array<string|int, mixed> = []
Return values
array<string|int, Item>

getItemsCount()

Returns number of items filtered by $filter.

public getItemsCount([array<string|int, mixed> $filter = [] ]) : int
Parameters
$filter : array<string|int, mixed> = []
Return values
int

getItemsCountFilteredByPermissions()

Returns number of items filtered by $filter with additional filter by permissions.

public getItemsCountFilteredByPermissions([array<string|int, mixed> $filter = [] ][, int|null $userId = null ][, string $operation = UserPermissions::OPERATION_READ ]) : int
Parameters
$filter : array<string|int, mixed> = []
  • Filter to count items with.
$userId : int|null = null
  • User identifier to check permissions.
$operation : string = UserPermissions::OPERATION_READ
  • Operation type.
Return values
int

getItemsFilteredByPermissions()

Method performs getList with additional filter by users permissions.

public getItemsFilteredByPermissions(array<string|int, mixed> $parameters[, int|null $userId = null ][, string|null $operation = UserPermissions::OPERATION_READ ]) : array<string|int, mixed>

First - collect all permissionTypes depending on current filter. If categories are not supported - there is only one type. If there is filter by categories - get all types for them. If there is not filter by categories - we should collect all existing categories. After collecting all types we can calculate sql for ids an apply it to the filter.

Parameters
$parameters : array<string|int, mixed>
  • getList orm parameters.
$userId : int|null = null
  • user identifier for which should be calculated permissions. If not passed - get current user.
$operation : string|null = UserPermissions::OPERATION_READ
  • type of operation to check permissions.
Return values
array<string|int, mixed>

getItemStageId()

public final getItemStageId(int $id) : string|null
Parameters
$id : int
Return values
string|null

getStage()

public getStage(string $statusId) : EO_Status|null
Parameters
$statusId : string
Return values
EO_Status|null

getStages()

Returns stages for $categoryId.

public getStages([int|null $categoryId = null ]) : EO_Status_Collection
Parameters
$categoryId : int|null = null
Return values
EO_Status_Collection

getStageSemantics()

Returns semantics of a stage with $stageId Returns null if the stage is not found

public final getStageSemantics(string $stageId) : string|null
Parameters
$stageId : string
Return values
string|null

getStagesEntityId()

Returns ENTITY_ID value for b_crm_status table.

public getStagesEntityId([int|null $categoryId = null ]) : string|null

If stages are not supported, returns null

Parameters
$categoryId : int|null = null
  • by default $categoryId from a default category is used. If categories are not supported, this parameter is ignored
Return values
string|null

getSuccessfulStage()

public final getSuccessfulStage([int|null $categoryId = null ]) : EO_Status|null
Parameters
$categoryId : int|null = null
Return values
EO_Status|null

getTrackedObject()

Returns TrackedObject, specific for this entity

public getTrackedObject(Item $itemBeforeSave[, Item|null $item = null ]) : TrackedObject
Parameters
$itemBeforeSave : Item
$item : Item|null = null
Return values
TrackedObject

getUpdateOperation()

Returns update operations for this entity.

public getUpdateOperation(Item $item[, Context $context = null ]) : Update
Parameters
$item : Item
$context : Context = null
Return values
Update

getUserFieldEntityId()

Returns ENTITY_ID for user fields.

public getUserFieldEntityId() : string
Return values
string

getUserFields()

Returns all user fields of this entity type. (Even those, that are not visible for current user).

public getUserFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUserFieldsInfo()

Returns fields info of all user fields of this entity type. (Even those, that are not visible for current user).

public getUserFieldsInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

isAutomationEnabled()

Returns true if this entity supported by automation.

public isAutomationEnabled() : bool
Return values
bool

isBeginCloseDatesEnabled()

Returns true if this entity supports 'Begin Date' and 'Close Date' for its elements

public isBeginCloseDatesEnabled() : bool
Return values
bool

isBizProcEnabled()

Returns true if this entity supported by business processes designer.

public isBizProcEnabled() : bool
Return values
bool

isCategoriesEnabled()

Returns true if this entity supports categories and they enabled in interfaces.

public isCategoriesEnabled() : bool
Return values
bool

isCategoriesSupported()

Returns true if this entity supports categories.

public isCategoriesSupported() : bool
Return values
bool

isCategoryAvailable()

Returns true if the category with the provided $categoryId is available for usage (is not locked or restricted)

public isCategoryAvailable(int $categoryId) : bool
Parameters
$categoryId : int
Return values
bool

isCategoryExists()

public isCategoryExists(int $categoryId) : bool
Parameters
$categoryId : int
Return values
bool

isClientEnabled()

Returns true if this entity supports 'Client' field for its elements

public isClientEnabled() : bool
Return values
bool

isCommunicationRoutingSupported()

public isCommunicationRoutingSupported() : bool
Return values
bool

isCountersEnabled()

Returns true if this entity supports counters.

public isCountersEnabled() : bool
Return values
bool

isCrmTrackingEnabled()

Returns true if this entity supports Crm Tracking

public isCrmTrackingEnabled() : bool
Return values
bool

isDeferredCleaningEnabled()

Returns true if after item deletion data that was linked to the item is deleted on agent by default

public isDeferredCleaningEnabled() : bool
Return values
bool

isDocumentGenerationEnabled()

Returns true if this entity supports integration with 'documentgenerator' module

public isDocumentGenerationEnabled() : bool
Return values
bool

isFieldExists()

public isFieldExists(string $commonFieldName) : bool
Parameters
$commonFieldName : string
Return values
bool

isInCustomSection()

public isInCustomSection() : bool
Return values
bool

isInventoryManagementEnabled()

Return true if inventory management is enabled for this entity.

public isInventoryManagementEnabled() : bool
Return values
bool

isLastActivityEnabled()

Returns true if 'last activity' functionality is enabled in UI

public isLastActivityEnabled() : bool
Return values
bool

isLastActivitySupported()

Returns true if this entity supports LAST_ACTIVITY_* fields and all associated logic

public isLastActivitySupported() : bool
Return values
bool

isLinkWithProductsEnabled()

Returns true if this entity supports links with Catalog products

public isLinkWithProductsEnabled() : bool
Return values
bool

isMultiFieldsEnabled()

Return true if this entity has own multi fields.

public isMultiFieldsEnabled() : bool
Return values
bool

isMultipleAssignedEnabled()

Returns true if this entity supports multiple assigned.

public isMultipleAssignedEnabled() : bool
Return values
bool

isMyCompanyEnabled()

Returns true if this entity supports 'My Company' field for its elements

public isMyCompanyEnabled() : bool
Return values
bool

isNewRoutingForAutomationEnabled()

Return true if urls for automation page of this entity should be routed by common templates

public isNewRoutingForAutomationEnabled() : bool
Return values
bool

isNewRoutingForDetailEnabled()

Return true if urls for detail pages of this entity should be routed by common templates

public isNewRoutingForDetailEnabled() : bool
Return values
bool

isNewRoutingForListEnabled()

Return true if urls for list pages of this entity should be routed by common templates

public isNewRoutingForListEnabled() : bool
Return values
bool

isObserversEnabled()

Returns true if this entity supports OBSERVERS field.

public isObserversEnabled() : bool
Return values
bool

isPaymentsEnabled()

Return true if payments procession is enabled for this entity.

public isPaymentsEnabled() : bool
Return values
bool

isRecyclebinEnabled()

Returns true if this entity supports recycle bin.

public isRecyclebinEnabled() : bool
Return values
bool

isSmartActivityNotificationEnabled()

public isSmartActivityNotificationEnabled() : bool
Return values
bool

isSmartActivityNotificationSupported()

public isSmartActivityNotificationSupported() : bool
Return values
bool

isSourceEnabled()

Returns true if this entity supports 'SOURCE_ID' and 'SOURCE_DESCRIPTION' fields for its elements

public isSourceEnabled() : bool
Return values
bool

isStagesEnabled()

public isStagesEnabled() : bool
Return values
bool

isStagesSupported()

Returns true if this entity supports stages.

public isStagesSupported() : bool
Return values
bool

isUseInUserfieldEnabled()

Returns true if this entity can be used in user field type 'crm'.

public isUseInUserfieldEnabled() : bool
Tags
see
ElementType
Return values
bool

setStartStageIdPermittedForUser()

Set first available stage of $item for user with $userId.

public setStartStageIdPermittedForUser(Item $item[, int|null $userId = null ]) : string|null

Return new stage identifier if it was set.

Parameters
$item : Item
  • Item to set stageId.
$userId : int|null = null
  • user identifier.
Return values
string|null

        
On this page

Search results