CCrmDeal extends CAllCrmDeal
Table of Contents
Constants
- CACHE_TTL = 3600
- DB_TYPE = 'MYSQL'
- SUSPENDED_USER_FIELD_ENTITY_ID = 'CRM_DEAL_SPD'
- TABLE_ALIAS = 'L'
- TABLE_NAME = 'b_crm_deal'
- TOTAL_COUNT_CACHE_ID = 'crm_deal_total_count'
- USER_FIELD_ENTITY_ID = 'CRM_DEAL'
Properties
- $LAST_ERROR : mixed
- $sUFEntityID : mixed
Methods
- __AfterPrepareSql() : mixed
- __construct() : mixed
- Add() : mixed
- AddObserverIDs() : mixed
- addProductRows() : mixed
- BuildEntityAttr() : mixed
- BuildPermSql() : mixed
- calculateDeliveryTotal() : int|float
- CheckCreatePermission() : mixed
- CheckDeletePermission() : mixed
- CheckExportPermission() : mixed
- CheckFields() : mixed
- CheckImportPermission() : mixed
- CheckReadPermission() : mixed
- CheckUpdatePermission() : mixed
- clearCategoryCache() : mixed
- CompareFields() : mixed
- CreateListBuilder() : mixed
- Delete() : mixed
- Exists() : mixed
- existsEntityWithStatus() : mixed
- FindByCommunication() : mixed
- GetAllStageNames() : mixed
- GetByID() : mixed
- GetCategoryID() : mixed
- GetCheckExceptions() : mixed
- GetCount() : mixed
- GetCustomerType() : mixed
- GetDefaultTitle() : mixed
- GetDefaultTitleTemplate() : mixed
- GetFailureStageID() : mixed
- GetFieldCaption() : mixed
- GetFields() : mixed
- GetFieldsInfo() : mixed
- GetFinalStageID() : mixed
- GetFinalStageSort() : mixed
- getLastError() : string
- GetLeftSiblingID() : mixed
- GetList() : CDBResult
- GetListEx() : mixed
- GetPermittedToCreateCategoryIDs() : mixed
- GetPermittedToReadCategoryIDs() : mixed
- GetPermittedToUpdateCategoryIDs() : mixed
- GetRightSiblingID() : mixed
- getSafeSaveRows() : array<string|int, mixed>
- GetSemanticID() : mixed
- GetStageName() : mixed
- GetStageNames() : mixed
- GetStages() : mixed
- GetStageSemantics() : mixed
- GetStageSort() : mixed
- GetStartStageID() : string
- Get start Stage ID for specified $categoryID.
- GetSuccessStageID() : mixed
- GetTopIDs() : mixed
- GetTotalCount() : mixed
- GetUserFieldEntityID() : mixed
- GetUserFields() : array<string|int, mixed>|mixed
- isManualOpportunity() : mixed
- IsStageExists() : mixed
- isUseOperation() : bool
- Returns true if this class should invoke Service\Operation instead old API.
- LoadProductRows() : mixed
- MoveToCategory() : mixed
- OnAccountCurrencyChange() : mixed
- PrepareConversionPermissionFlags() : mixed
- PrepareFilter() : mixed
- ProcessCompanyDeletion() : mixed
- ProcessContactDeletion() : mixed
- ProcessLeadDeletion() : mixed
- ProcessStatusDeletion() : mixed
- ProcessStatusModification() : mixed
- PullChange() : mixed
- Rebind() : mixed
- RebuildEntityAccessAttrs() : mixed
- RebuildSemantics() : mixed
- RebuildStatistics() : mixed
- RefreshAccountingData() : mixed
- RemoveObserverIDs() : mixed
- ReplaceObserverIDs() : mixed
- ResolveCustomerType() : mixed
- SaveProductRows() : mixed
- SynchronizeProductRows() : mixed
- Update() : mixed
Constants
CACHE_TTL
public
mixed
CACHE_TTL
= 3600
DB_TYPE
public
mixed
DB_TYPE
= 'MYSQL'
SUSPENDED_USER_FIELD_ENTITY_ID
public
mixed
SUSPENDED_USER_FIELD_ENTITY_ID
= 'CRM_DEAL_SPD'
TABLE_ALIAS
public
mixed
TABLE_ALIAS
= 'L'
TABLE_NAME
public
mixed
TABLE_NAME
= 'b_crm_deal'
TOTAL_COUNT_CACHE_ID
public
mixed
TOTAL_COUNT_CACHE_ID
= 'crm_deal_total_count'
USER_FIELD_ENTITY_ID
public
mixed
USER_FIELD_ENTITY_ID
= 'CRM_DEAL'
Properties
$LAST_ERROR
public
mixed
$LAST_ERROR
= ''
$sUFEntityID
public
static mixed
$sUFEntityID
= 'CRM_DEAL'
Methods
__AfterPrepareSql()
public
static __AfterPrepareSql(mixed $sender, mixed $arOrder, mixed $arFilter, mixed $arGroupBy, mixed $arSelectFields) : mixed
Parameters
- $sender : mixed
- $arOrder : mixed
- $arFilter : mixed
- $arGroupBy : mixed
- $arSelectFields : mixed
__construct()
public
__construct([mixed $bCheckPermission = true ]) : mixed
Parameters
- $bCheckPermission : mixed = true
Add()
public
Add(array<string|int, mixed> &$arFields[, mixed $bUpdateSearch = true ][, mixed $options = array() ]) : mixed
Parameters
- $arFields : array<string|int, mixed>
- $bUpdateSearch : mixed = true
- $options : mixed = array()
AddObserverIDs()
public
static AddObserverIDs(mixed $ID, array<string|int, mixed> $userIDs) : mixed
Parameters
- $ID : mixed
- $userIDs : array<string|int, mixed>
addProductRows()
public
static addProductRows(int $ID, array<string|int, mixed> $newRows[, array<string|int, mixed> $options = [] ][, mixed $checkPerms = true ][, mixed $regEvent = true ][, mixed $syncOwner = true ]) : mixed
Parameters
- $ID : int
- $newRows : array<string|int, mixed>
- $options : array<string|int, mixed> = []
- $checkPerms : mixed = true
- $regEvent : mixed = true
- $syncOwner : mixed = true
BuildEntityAttr()
public
static BuildEntityAttr(mixed $userID[, mixed $arAttr = array() ]) : mixed
Parameters
- $userID : mixed
- $arAttr : mixed = array()
BuildPermSql()
public
static BuildPermSql([mixed $sAliasPrefix = 'L' ][, mixed $mPermType = 'READ' ][, mixed $arOptions = [] ]) : mixed
Parameters
- $sAliasPrefix : mixed = 'L'
- $mPermType : mixed = 'READ'
- $arOptions : mixed = []
calculateDeliveryTotal()
public
static calculateDeliveryTotal(int $id) : int|float
Collects sum of shipments from orders related to deal $id
Parameters
- $id : int
-
Deal ID
Return values
int|floatCheckCreatePermission()
public
static CheckCreatePermission([mixed $userPermissions = null ][, int|null $categoryId = null ]) : mixed
Parameters
- $userPermissions : mixed = null
- $categoryId : int|null = null
Tags
CheckDeletePermission()
public
static CheckDeletePermission(mixed $id[, mixed $userPermissions = null ][, int|null $categoryId = null ]) : mixed
Parameters
- $id : mixed
- $userPermissions : mixed = null
- $categoryId : int|null = null
Tags
CheckExportPermission()
public
static CheckExportPermission([mixed $userPermissions = null ][, int $categoryId = 0 ]) : mixed
Parameters
- $userPermissions : mixed = null
- $categoryId : int = 0
Tags
CheckFields()
public
CheckFields(mixed &$arFields[, mixed $ID = false ][, mixed $options = array() ]) : mixed
Parameters
- $arFields : mixed
- $ID : mixed = false
- $options : mixed = array()
CheckImportPermission()
public
static CheckImportPermission([mixed $userPermissions = null ][, int $categoryId = 0 ]) : mixed
Parameters
- $userPermissions : mixed = null
- $categoryId : int = 0
Tags
CheckReadPermission()
public
static CheckReadPermission([mixed $id = 0 ][, mixed $userPermissions = null ][, int|null $categoryId = null ]) : mixed
Parameters
- $id : mixed = 0
- $userPermissions : mixed = null
- $categoryId : int|null = null
Tags
CheckUpdatePermission()
public
static CheckUpdatePermission(mixed $id[, mixed $userPermissions = null ][, int|null $categoryId = null ]) : mixed
Parameters
- $id : mixed
- $userPermissions : mixed = null
- $categoryId : int|null = null
Tags
clearCategoryCache()
public
static clearCategoryCache(mixed $ID) : mixed
Parameters
- $ID : mixed
CompareFields()
public
static CompareFields(mixed $arFieldsOrig, mixed $arFieldsModif[, mixed $bCheckPerms = true ][, array<string|int, mixed> $arOptions = null ]) : mixed
Parameters
- $arFieldsOrig : mixed
- $arFieldsModif : mixed
- $bCheckPerms : mixed = true
- $arOptions : array<string|int, mixed> = null
CreateListBuilder()
public
static CreateListBuilder([array<string|int, mixed> $arFieldOptions = null ]) : mixed
Parameters
- $arFieldOptions : array<string|int, mixed> = null
Delete()
public
Delete(mixed $ID[, mixed $arOptions = array() ]) : mixed
Parameters
- $ID : mixed
- $arOptions : mixed = array()
Exists()
public
static Exists(mixed $ID) : mixed
Parameters
- $ID : mixed
existsEntityWithStatus()
public
static existsEntityWithStatus(mixed $stageId) : mixed
Parameters
- $stageId : mixed
FindByCommunication()
public
static FindByCommunication(mixed $entityTypeID, mixed $type, mixed $value[, mixed $checkPermissions = true ][, array<string|int, mixed> $select = null ][, array<string|int, mixed> $order = null ]) : mixed
Parameters
- $entityTypeID : mixed
- $type : mixed
- $value : mixed
- $checkPermissions : mixed = true
- $select : array<string|int, mixed> = null
- $order : array<string|int, mixed> = null
GetAllStageNames()
public
static GetAllStageNames([mixed $categoryID = 0 ]) : mixed
Parameters
- $categoryID : mixed = 0
GetByID()
public
static GetByID(mixed $ID[, mixed $bCheckPerms = true ]) : mixed
Parameters
- $ID : mixed
- $bCheckPerms : mixed = true
GetCategoryID()
public
static GetCategoryID(mixed $ID) : mixed
Parameters
- $ID : mixed
GetCheckExceptions()
public
GetCheckExceptions() : mixed
GetCount()
public
static GetCount(mixed $arFilter) : mixed
Parameters
- $arFilter : mixed
GetCustomerType()
public
static GetCustomerType(mixed $ID) : mixed
Parameters
- $ID : mixed
GetDefaultTitle()
public
static GetDefaultTitle([mixed $number = '' ]) : mixed
Parameters
- $number : mixed = ''
GetDefaultTitleTemplate()
public
static GetDefaultTitleTemplate() : mixed
GetFailureStageID()
public
static GetFailureStageID([mixed $categoryID = 0 ]) : mixed
Parameters
- $categoryID : mixed = 0
GetFieldCaption()
public
static GetFieldCaption(mixed $fieldName) : mixed
Parameters
- $fieldName : mixed
GetFields()
public
static GetFields([mixed $arOptions = null ]) : mixed
Parameters
- $arOptions : mixed = null
GetFieldsInfo()
public
static GetFieldsInfo() : mixed
GetFinalStageID()
public
static GetFinalStageID([mixed $categoryID = 0 ]) : mixed
Parameters
- $categoryID : mixed = 0
GetFinalStageSort()
public
static GetFinalStageSort([mixed $categoryID = 0 ]) : mixed
Parameters
- $categoryID : mixed = 0
getLastError()
public
getLastError() : string
Return values
stringGetLeftSiblingID()
public
static GetLeftSiblingID(mixed $ID) : mixed
Parameters
- $ID : mixed
GetList()
public
static GetList([array<string|int, mixed> $arOrder = array('DATE_CREATE' => 'DESC') ][, array<string|int, mixed> $arFilter = array() ][, array<string|int, mixed> $arSelect = array() ][, mixed $nPageTop = false ]) : CDBResult
Parameters
- $arOrder : array<string|int, mixed> = array('DATE_CREATE' => 'DESC')
- $arFilter : array<string|int, mixed> = array()
- $arSelect : array<string|int, mixed> = array()
- $nPageTop : mixed = false
Return values
CDBResult —Obsolete. Always select all record from database. Please use GetListEx instead.
GetListEx()
public
static GetListEx([mixed $arOrder = array() ][, mixed $arFilter = array() ][, mixed $arGroupBy = false ][, mixed $arNavStartParams = false ][, mixed $arSelectFields = array() ][, mixed $arOptions = array() ]) : mixed
Parameters
- $arOrder : mixed = array()
- $arFilter : mixed = array()
- $arGroupBy : mixed = false
- $arNavStartParams : mixed = false
- $arSelectFields : mixed = array()
- $arOptions : mixed = array()
GetPermittedToCreateCategoryIDs()
public
static GetPermittedToCreateCategoryIDs([CCrmPerms $userPermissions = null ]) : mixed
Parameters
- $userPermissions : CCrmPerms = null
Tags
GetPermittedToReadCategoryIDs()
public
static GetPermittedToReadCategoryIDs([CCrmPerms $userPermissions = null ]) : mixed
Parameters
- $userPermissions : CCrmPerms = null
Tags
GetPermittedToUpdateCategoryIDs()
public
static GetPermittedToUpdateCategoryIDs([CCrmPerms $userPermissions = null ]) : mixed
Parameters
- $userPermissions : CCrmPerms = null
Tags
GetRightSiblingID()
public
static GetRightSiblingID(mixed $ID) : mixed
Parameters
- $ID : mixed
getSafeSaveRows()
public
static getSafeSaveRows() : array<string|int, mixed>
Return values
array<string|int, mixed>GetSemanticID()
public
static GetSemanticID(mixed $stageID[, mixed $categoryID = -1 ]) : mixed
Parameters
- $stageID : mixed
- $categoryID : mixed = -1
GetStageName()
public
static GetStageName(mixed $stageID[, mixed $categoryID = -1 ]) : mixed
Parameters
- $stageID : mixed
- $categoryID : mixed = -1
GetStageNames()
public
static GetStageNames([mixed $categoryID = 0 ]) : mixed
Parameters
- $categoryID : mixed = 0
GetStages()
public
static GetStages([mixed $categoryID = 0 ]) : mixed
Parameters
- $categoryID : mixed = 0
GetStageSemantics()
public
static GetStageSemantics(mixed $stageID[, mixed $categoryID = -1 ]) : mixed
Parameters
- $stageID : mixed
- $categoryID : mixed = -1
GetStageSort()
public
static GetStageSort(mixed $stageID[, mixed $categoryID = -1 ]) : mixed
Parameters
- $stageID : mixed
- $categoryID : mixed = -1
GetStartStageID()
Get start Stage ID for specified $categoryID.
public
static GetStartStageID([int $categoryID = 0 ]) : string
Parameters
- $categoryID : int = 0
-
Category ID.
Return values
stringGetSuccessStageID()
public
static GetSuccessStageID([mixed $categoryID = 0 ]) : mixed
Parameters
- $categoryID : mixed = 0
GetTopIDs()
public
static GetTopIDs(mixed $top[, mixed $sortType = 'ASC' ]) : mixed
Parameters
- $top : mixed
- $sortType : mixed = 'ASC'
GetTotalCount()
public
static GetTotalCount() : mixed
GetUserFieldEntityID()
public
static GetUserFieldEntityID() : mixed
GetUserFields()
public
static GetUserFields([bool|string $langId = false ][, int $valueId = 0 ]) : array<string|int, mixed>|mixed
Parameters
- $langId : bool|string = false
- $valueId : int = 0
Return values
array<string|int, mixed>|mixedisManualOpportunity()
public
static isManualOpportunity(mixed $ID) : mixed
Parameters
- $ID : mixed
IsStageExists()
public
static IsStageExists(mixed $stageID[, mixed $categoryID = -1 ][, array<string|int, mixed> $params = [] ]) : mixed
Parameters
- $stageID : mixed
- $categoryID : mixed = -1
- $params : array<string|int, mixed> = []
isUseOperation()
Returns true if this class should invoke Service\Operation instead old API.
public
isUseOperation() : bool
For a start it will return false by default. Please use this period to test your customization on compatibility with new API. Later it will return true by default. In several months this class will be declared as deprecated and old code will be deleted completely.
Return values
boolLoadProductRows()
public
static LoadProductRows(mixed $ID) : mixed
Parameters
- $ID : mixed
MoveToCategory()
public
static MoveToCategory(mixed $ID, mixed $newCategoryID[, array<string|int, mixed> $options = null ]) : mixed
Parameters
- $ID : mixed
- $newCategoryID : mixed
- $options : array<string|int, mixed> = null
OnAccountCurrencyChange()
public
static OnAccountCurrencyChange() : mixed
PrepareConversionPermissionFlags()
public
static PrepareConversionPermissionFlags(mixed $ID, array<string|int, mixed> &$params) : mixed
Parameters
- $ID : mixed
- $params : array<string|int, mixed>
PrepareFilter()
public
static PrepareFilter(mixed &$arFilter[, mixed $arFilter2Logic = null ]) : mixed
Parameters
- $arFilter : mixed
- $arFilter2Logic : mixed = null
ProcessCompanyDeletion()
public
static ProcessCompanyDeletion(mixed $companyID) : mixed
Parameters
- $companyID : mixed
ProcessContactDeletion()
public
static ProcessContactDeletion(mixed $contactID) : mixed
Parameters
- $contactID : mixed
ProcessLeadDeletion()
public
static ProcessLeadDeletion(mixed $leadID) : mixed
Parameters
- $leadID : mixed
ProcessStatusDeletion()
public
static ProcessStatusDeletion(array<string|int, mixed> $fields) : mixed
Parameters
- $fields : array<string|int, mixed>
ProcessStatusModification()
public
static ProcessStatusModification(array<string|int, mixed> $fields) : mixed
Parameters
- $fields : array<string|int, mixed>
PullChange()
public
static PullChange(mixed $type, mixed $arParams) : mixed
Parameters
- $type : mixed
- $arParams : mixed
Rebind()
public
static Rebind(mixed $ownerTypeID, mixed $oldID, mixed $newID) : mixed
Parameters
- $ownerTypeID : mixed
- $oldID : mixed
- $newID : mixed
RebuildEntityAccessAttrs()
public
static RebuildEntityAccessAttrs(mixed $IDs) : mixed
Parameters
- $IDs : mixed
RebuildSemantics()
public
static RebuildSemantics(array<string|int, mixed> $IDs[, array<string|int, mixed> $options = null ]) : mixed
Parameters
- $IDs : array<string|int, mixed>
- $options : array<string|int, mixed> = null
RebuildStatistics()
public
static RebuildStatistics(array<string|int, mixed> $IDs[, array<string|int, mixed> $options = null ]) : mixed
Parameters
- $IDs : array<string|int, mixed>
- $options : array<string|int, mixed> = null
RefreshAccountingData()
public
static RefreshAccountingData(array<string|int, mixed> $IDs) : mixed
Parameters
- $IDs : array<string|int, mixed>
RemoveObserverIDs()
public
static RemoveObserverIDs(mixed $ID, array<string|int, mixed> $userIDs) : mixed
Parameters
- $ID : mixed
- $userIDs : array<string|int, mixed>
ReplaceObserverIDs()
public
static ReplaceObserverIDs(mixed $ID, array<string|int, mixed> $userIDs) : mixed
Parameters
- $ID : mixed
- $userIDs : array<string|int, mixed>
ResolveCustomerType()
public
static ResolveCustomerType(array<string|int, mixed> $arFields) : mixed
Parameters
- $arFields : array<string|int, mixed>
SaveProductRows()
public
static SaveProductRows(mixed $ID, mixed $arRows[, mixed $checkPerms = true ][, mixed $regEvent = true ][, mixed $syncOwner = true ]) : mixed
Parameters
- $ID : mixed
- $arRows : mixed
- $checkPerms : mixed = true
- $regEvent : mixed = true
- $syncOwner : mixed = true
SynchronizeProductRows()
public
static SynchronizeProductRows(mixed $ID[, mixed $checkPerms = true ]) : mixed
Parameters
- $ID : mixed
- $checkPerms : mixed = true
Update()
public
Update(mixed $ID, array<string|int, mixed> &$arFields[, mixed $bCompare = true ][, mixed $bUpdateSearch = true ][, mixed $options = array() ]) : mixed
Parameters
- $ID : mixed
- $arFields : array<string|int, mixed>
- $bCompare : mixed = true
- $bUpdateSearch : mixed = true
- $options : mixed = array()