Import extends Add
Table of Contents
Constants
- ACTION_AFTER_SAVE = 'afterSave'
- ACTION_BEFORE_SAVE = 'beforeSave'
- DEFAULT_ACTION_SORT = 500
- ERROR_CODE_ITEM_ADD_ACCESS_DENIED = 'CRM_ITEM_ADD_ACCESS_DENIED'
- ERROR_CODE_ITEM_DELETE_ACCESS_DENIED = 'CRM_ITEM_DELETE_ACCESS_DENIED'
- ERROR_CODE_ITEM_HAS_RUNNING_WORKFLOWS = 'CRM_ITEM_HAS_RUNNING_WORKFLOWS'
- ERROR_CODE_ITEM_IMPORT_ACCESS_DENIED = 'CRM_ITEM_IMPORT_ACCESS_DENIED'
- ERROR_CODE_ITEM_READ_ACCESS_DENIED = 'CRM_ITEM_READ_ACCESS_DENIED'
- ERROR_CODE_ITEM_UPDATE_ACCESS_DENIED = 'CRM_ITEM_UPDATE_ACCESS_DENIED'
- MESSAGE_FIELD_CRATED_TIME_VALUE_IN_FUTURE = 'CRM_FIELD_CRATED_TIME_VALUE_IN_FUTURE_ERROR'
- MESSAGE_FIELD_CRATED_TIME_VALUE_NOT_MONOTONE = 'CRM_FIELD_CRATED_TIME_VALUE_NOT_MONOTONE_ERROR'
- MESSAGE_FIELD_ONLY_ADMIN_CAN_SET = 'CRM_FIELD_VALUE_ONLY_ADMIN_CAN_SET_ERROR'
- MESSAGE_FIELD_VALUE_CAN_NOT_BE_GREATER = 'CRM_FIELD_VALUE_CAN_NOT_BE_GREATER_ERROR'
Methods
- __construct() : mixed
- addAction() : self
- checkAccess() : Result
- checkFields() : Result
- This method checks that user fields filled properly according to their types and settings.
- checkRequiredFields() : Result
- Check that required fields are filled.
- checkRunningWorkflows() : Result
- Check running workflows and abort operation if needed.
- checkSystemFieldsValues() : Result
- disableActivitiesAutocompletion() : self
- disableAfterSaveActions() : self
- disableAllChecks() : self
- disableAutomation() : self
- disableBeforeSaveActions() : self
- disableBizProc() : self
- disableCheckAccess() : self
- disableCheckFields() : self
- disableCheckLimits() : self
- disableCheckRequiredUserFields() : self
- disableCheckWorkflows() : self
- disableDeferredCleaning() : self
- disableDuplicatesIndexInvalidation() : self
- disableFieldProcession() : self
- disableSaveToHistory() : self
- disableSaveToTimeline() : self
- enableActivitiesAutocompletion() : self
- enableAfterSaveActions() : self
- enableAutomation() : self
- enableBeforeSaveActions() : self
- enableBizProc() : self
- enableCheckAccess() : self
- enableCheckFields() : self
- enableCheckLimits() : self
- enableCheckRequiredUserFields() : self
- enableCheckWorkflows() : self
- enableDeferredCleaning() : self
- enableDuplicatesIndexInvalidation() : self
- enableFieldProcession() : self
- enableSaveToHistory() : self
- enableSaveToTimeline() : self
- excludeItemsFromTimelineRelationEventsRegistration() : $this
- Exclude the specified items from being registered in this item's timeline as bound item
- exportSettings() : Settings
- Returns an object that describes a configuration of this Operation
- getActivityProvidersToAutocomplete() : array<string|int, string>
- Returns ids of activity providers that should be autocompleted.
- getContext() : Context
- Returns a Context object from the current settings
- getItem() : Item
- getItemBeforeSave() : Item|null
- getItemsThatExcludedFromTimelineRelationEventsRegistration() : array<string|int, ItemIdentifier>
- Get items that are excluded from being registered in this item's timeline as bound item
- getRequiredFields() : array<string|int, mixed>
- getStageDependantRequiredFields() : array<string|int, string>
- Returns a list of names of fields that are required by FieldAttributeManager configs.
- getStatisticsFacade() : OperationFacade|null
- importSettings() : $this
- Set a new settings object that describes a configuration of this Operation
- isActivitiesAutocompletionEnabled() : bool
- isAfterSaveActionsEnabled() : bool
- isAutomationEnabled() : bool
- isBeforeSaveActionsEnabled() : bool
- isBizProcEnabled() : bool
- isCheckAccessEnabled() : bool
- isCheckFieldsEnabled() : bool
- isCheckLimitsEnabled() : bool
- isCheckRequiredUserFields() : bool
- isCheckWorkflowsEnabled() : bool
- isDeferredCleaningEnabled() : bool
- isDuplicatesIndexInvalidationEnabled() : bool
- isFieldProcessionEnabled() : bool
- isItemChanged() : bool
- Return true if item has been changed.
- isSaveToHistoryEnabled() : bool
- isSaveToTimelineEnabled() : bool
- launch() : Result
- processFieldsAfterSave() : Result
- processFieldsBeforeSave() : Result
- Invoke Field::process() on each field from $this->fieldsCollection and collect errors.
- processFieldsWithPermissions() : Result
- removeAction() : self
- setActivityProvidersToAutocomplete() : $this
- setContext() : $this
- Sets a new Context object to the current settings
- setStatisticsFacade() : self
- updateItemFromUpdateEvent() : void
Constants
ACTION_AFTER_SAVE
public
mixed
ACTION_AFTER_SAVE
= 'afterSave'
ACTION_BEFORE_SAVE
public
mixed
ACTION_BEFORE_SAVE
= 'beforeSave'
DEFAULT_ACTION_SORT
public
mixed
DEFAULT_ACTION_SORT
= 500
ERROR_CODE_ITEM_ADD_ACCESS_DENIED
public
mixed
ERROR_CODE_ITEM_ADD_ACCESS_DENIED
= 'CRM_ITEM_ADD_ACCESS_DENIED'
ERROR_CODE_ITEM_DELETE_ACCESS_DENIED
public
mixed
ERROR_CODE_ITEM_DELETE_ACCESS_DENIED
= 'CRM_ITEM_DELETE_ACCESS_DENIED'
ERROR_CODE_ITEM_HAS_RUNNING_WORKFLOWS
public
mixed
ERROR_CODE_ITEM_HAS_RUNNING_WORKFLOWS
= 'CRM_ITEM_HAS_RUNNING_WORKFLOWS'
ERROR_CODE_ITEM_IMPORT_ACCESS_DENIED
public
mixed
ERROR_CODE_ITEM_IMPORT_ACCESS_DENIED
= 'CRM_ITEM_IMPORT_ACCESS_DENIED'
ERROR_CODE_ITEM_READ_ACCESS_DENIED
public
mixed
ERROR_CODE_ITEM_READ_ACCESS_DENIED
= 'CRM_ITEM_READ_ACCESS_DENIED'
ERROR_CODE_ITEM_UPDATE_ACCESS_DENIED
public
mixed
ERROR_CODE_ITEM_UPDATE_ACCESS_DENIED
= 'CRM_ITEM_UPDATE_ACCESS_DENIED'
MESSAGE_FIELD_CRATED_TIME_VALUE_IN_FUTURE
public
mixed
MESSAGE_FIELD_CRATED_TIME_VALUE_IN_FUTURE
= 'CRM_FIELD_CRATED_TIME_VALUE_IN_FUTURE_ERROR'
MESSAGE_FIELD_CRATED_TIME_VALUE_NOT_MONOTONE
public
mixed
MESSAGE_FIELD_CRATED_TIME_VALUE_NOT_MONOTONE
= 'CRM_FIELD_CRATED_TIME_VALUE_NOT_MONOTONE_ERROR'
MESSAGE_FIELD_ONLY_ADMIN_CAN_SET
public
mixed
MESSAGE_FIELD_ONLY_ADMIN_CAN_SET
= 'CRM_FIELD_VALUE_ONLY_ADMIN_CAN_SET_ERROR'
MESSAGE_FIELD_VALUE_CAN_NOT_BE_GREATER
public
mixed
MESSAGE_FIELD_VALUE_CAN_NOT_BE_GREATER
= 'CRM_FIELD_VALUE_CAN_NOT_BE_GREATER_ERROR'
Methods
__construct()
public
__construct(Item $item, Settings $settings[, Collection $fieldsCollection = null ]) : mixed
Parameters
- $item : Item
- $settings : Settings
- $fieldsCollection : Collection = null
addAction()
public
addAction(string $actionPlacement, Action $action[, int $sort = self::DEFAULT_ACTION_SORT ]) : self
Parameters
- $actionPlacement : string
- $action : Action
- $sort : int = self::DEFAULT_ACTION_SORT
Return values
selfcheckAccess()
public
checkAccess() : Result
Return values
ResultcheckFields()
This method checks that user fields filled properly according to their types and settings.
public
checkFields() : Result
Also here checks that required fields are not empty.
Return values
ResultcheckRequiredFields()
Check that required fields are filled.
public
checkRequiredFields(array<string|int, string> $requiredFields, Factory $factory) : Result
Parameters
- $requiredFields : array<string|int, string>
-
- required field names.
- $factory : Factory
Return values
ResultcheckRunningWorkflows()
Check running workflows and abort operation if needed.
public
checkRunningWorkflows() : Result
Return values
ResultcheckSystemFieldsValues()
public
checkSystemFieldsValues(array<string|int, mixed> $systemFieldsValues) : Result
Parameters
- $systemFieldsValues : array<string|int, mixed>
Return values
ResultdisableActivitiesAutocompletion()
public
disableActivitiesAutocompletion() : self
Return values
selfdisableAfterSaveActions()
public
disableAfterSaveActions() : self
Return values
selfdisableAllChecks()
public
disableAllChecks() : self
Return values
selfdisableAutomation()
public
disableAutomation() : self
Return values
selfdisableBeforeSaveActions()
public
disableBeforeSaveActions() : self
Return values
selfdisableBizProc()
public
disableBizProc() : self
Return values
selfdisableCheckAccess()
public
disableCheckAccess() : self
Return values
selfdisableCheckFields()
public
disableCheckFields() : self
Return values
selfdisableCheckLimits()
public
disableCheckLimits() : self
Return values
selfdisableCheckRequiredUserFields()
public
disableCheckRequiredUserFields() : self
Return values
selfdisableCheckWorkflows()
public
disableCheckWorkflows() : self
Return values
selfdisableDeferredCleaning()
public
disableDeferredCleaning() : self
Return values
selfdisableDuplicatesIndexInvalidation()
public
disableDuplicatesIndexInvalidation() : self
Return values
selfdisableFieldProcession()
public
disableFieldProcession() : self
Return values
selfdisableSaveToHistory()
public
disableSaveToHistory() : self
Return values
selfdisableSaveToTimeline()
public
disableSaveToTimeline() : self
Return values
selfenableActivitiesAutocompletion()
public
enableActivitiesAutocompletion() : self
Return values
selfenableAfterSaveActions()
public
enableAfterSaveActions() : self
Return values
selfenableAutomation()
public
enableAutomation() : self
Return values
selfenableBeforeSaveActions()
public
enableBeforeSaveActions() : self
Return values
selfenableBizProc()
public
enableBizProc() : self
Return values
selfenableCheckAccess()
public
enableCheckAccess() : self
Return values
selfenableCheckFields()
public
enableCheckFields() : self
Return values
selfenableCheckLimits()
public
enableCheckLimits() : self
Return values
selfenableCheckRequiredUserFields()
public
enableCheckRequiredUserFields() : self
Return values
selfenableCheckWorkflows()
public
enableCheckWorkflows() : self
Return values
selfenableDeferredCleaning()
public
enableDeferredCleaning() : self
Return values
selfenableDuplicatesIndexInvalidation()
public
enableDuplicatesIndexInvalidation() : self
Return values
selfenableFieldProcession()
public
enableFieldProcession() : self
Return values
selfenableSaveToHistory()
public
enableSaveToHistory() : self
Return values
selfenableSaveToTimeline()
public
enableSaveToTimeline() : self
Return values
selfexcludeItemsFromTimelineRelationEventsRegistration()
Exclude the specified items from being registered in this item's timeline as bound item
public
excludeItemsFromTimelineRelationEventsRegistration(array<string|int, ItemIdentifier> $itemsToExclude) : $this
Parameters
- $itemsToExclude : array<string|int, ItemIdentifier>
Return values
$thisexportSettings()
Returns an object that describes a configuration of this Operation
public
exportSettings() : Settings
Return values
SettingsgetActivityProvidersToAutocomplete()
Returns ids of activity providers that should be autocompleted.
public
getActivityProvidersToAutocomplete() : array<string|int, string>
Empty array as result means that no activities will be completed.
Return values
array<string|int, string>getContext()
Returns a Context object from the current settings
public
getContext() : Context
Return values
ContextgetItem()
public
getItem() : Item
Return values
ItemgetItemBeforeSave()
public
getItemBeforeSave() : Item|null
Return values
Item|nullgetItemsThatExcludedFromTimelineRelationEventsRegistration()
Get items that are excluded from being registered in this item's timeline as bound item
public
getItemsThatExcludedFromTimelineRelationEventsRegistration() : array<string|int, ItemIdentifier>
Return values
array<string|int, ItemIdentifier>getRequiredFields()
public
final getRequiredFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getStageDependantRequiredFields()
Returns a list of names of fields that are required by FieldAttributeManager configs.
public
getStageDependantRequiredFields(Factory $factory) : array<string|int, string>
Some fields can be required for a specified range of stages. Some are always required regardless of an item stage.
Parameters
- $factory : Factory
Return values
array<string|int, string>getStatisticsFacade()
public
getStatisticsFacade() : OperationFacade|null
Return values
OperationFacade|nullimportSettings()
Set a new settings object that describes a configuration of this Operation
public
importSettings(Settings $settings) : $this
Parameters
- $settings : Settings
Return values
$thisisActivitiesAutocompletionEnabled()
public
isActivitiesAutocompletionEnabled() : bool
Return values
boolisAfterSaveActionsEnabled()
public
isAfterSaveActionsEnabled() : bool
Return values
boolisAutomationEnabled()
public
isAutomationEnabled() : bool
Return values
boolisBeforeSaveActionsEnabled()
public
isBeforeSaveActionsEnabled() : bool
Return values
boolisBizProcEnabled()
public
isBizProcEnabled() : bool
Return values
boolisCheckAccessEnabled()
public
isCheckAccessEnabled() : bool
Return values
boolisCheckFieldsEnabled()
public
isCheckFieldsEnabled() : bool
Return values
boolisCheckLimitsEnabled()
public
isCheckLimitsEnabled() : bool
Return values
boolisCheckRequiredUserFields()
public
isCheckRequiredUserFields() : bool
Return values
boolisCheckWorkflowsEnabled()
public
isCheckWorkflowsEnabled() : bool
Return values
boolisDeferredCleaningEnabled()
public
isDeferredCleaningEnabled() : bool
Return values
boolisDuplicatesIndexInvalidationEnabled()
public
isDuplicatesIndexInvalidationEnabled() : bool
Return values
boolisFieldProcessionEnabled()
public
isFieldProcessionEnabled() : bool
Return values
boolisItemChanged()
Return true if item has been changed.
public
isItemChanged() : bool
Return values
boolisSaveToHistoryEnabled()
public
isSaveToHistoryEnabled() : bool
Return values
boolisSaveToTimelineEnabled()
public
isSaveToTimelineEnabled() : bool
Return values
boollaunch()
public
launch() : Result
Return values
ResultprocessFieldsAfterSave()
public
processFieldsAfterSave() : Result
Return values
ResultprocessFieldsBeforeSave()
Invoke Field::process() on each field from $this->fieldsCollection and collect errors.
public
processFieldsBeforeSave() : Result
Return values
ResultprocessFieldsWithPermissions()
public
processFieldsWithPermissions() : Result
Return values
ResultremoveAction()
public
removeAction(string $actionPlacement, string $actionClassName) : self
Parameters
- $actionPlacement : string
- $actionClassName : string
Return values
selfsetActivityProvidersToAutocomplete()
public
setActivityProvidersToAutocomplete(array<string|int, string> $providersIds) : $this
Parameters
- $providersIds : array<string|int, string>
Return values
$thissetContext()
Sets a new Context object to the current settings
public
setContext(Context $context) : $this
Parameters
- $context : Context
Return values
$thissetStatisticsFacade()
public
setStatisticsFacade(OperationFacade|null $statisticsFacade) : self
Parameters
- $statisticsFacade : OperationFacade|null
Return values
selfupdateItemFromUpdateEvent()
public
updateItemFromUpdateEvent(Event $event) : void
Parameters
- $event : Event