Bitrix API

Restore 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_READ_ACCESS_DENIED  = 'CRM_ITEM_READ_ACCESS_DENIED'
ERROR_CODE_ITEM_UPDATE_ACCESS_DENIED  = 'CRM_ITEM_UPDATE_ACCESS_DENIED'

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.
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
We should be able to explicitly set created, updated and moved data for an item during restoration. Otherwise, we will lose real info about when an original item (before deletion) was created, etc.
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_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'

Methods

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
self

checkAccess()

public checkAccess() : Result
Return values
Result

checkFields()

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
Result

checkRequiredFields()

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
Result

checkRunningWorkflows()

Check running workflows and abort operation if needed.

public checkRunningWorkflows() : Result
Return values
Result

disableActivitiesAutocompletion()

public disableActivitiesAutocompletion() : self
Return values
self

disableAfterSaveActions()

public disableAfterSaveActions() : self
Return values
self

disableAllChecks()

public disableAllChecks() : self
Return values
self

disableAutomation()

public disableAutomation() : self
Return values
self

disableBeforeSaveActions()

public disableBeforeSaveActions() : self
Return values
self

disableBizProc()

public disableBizProc() : self
Return values
self

disableCheckAccess()

public disableCheckAccess() : self
Return values
self

disableCheckFields()

public disableCheckFields() : self
Return values
self

disableCheckLimits()

public disableCheckLimits() : self
Return values
self

disableCheckRequiredUserFields()

public disableCheckRequiredUserFields() : self
Return values
self

disableCheckWorkflows()

public disableCheckWorkflows() : self
Return values
self

disableDeferredCleaning()

public disableDeferredCleaning() : self
Return values
self

disableDuplicatesIndexInvalidation()

public disableDuplicatesIndexInvalidation() : self
Return values
self

disableFieldProcession()

public disableFieldProcession() : self
Return values
self

disableSaveToHistory()

public disableSaveToHistory() : self
Return values
self

disableSaveToTimeline()

public disableSaveToTimeline() : self
Return values
self

enableActivitiesAutocompletion()

public enableActivitiesAutocompletion() : self
Return values
self

enableAfterSaveActions()

public enableAfterSaveActions() : self
Return values
self

enableAutomation()

public enableAutomation() : self
Return values
self

enableBeforeSaveActions()

public enableBeforeSaveActions() : self
Return values
self

enableBizProc()

public enableBizProc() : self
Return values
self

enableCheckAccess()

public enableCheckAccess() : self
Return values
self

enableCheckFields()

public enableCheckFields() : self
Return values
self

enableCheckLimits()

public enableCheckLimits() : self
Return values
self

enableCheckRequiredUserFields()

public enableCheckRequiredUserFields() : self
Return values
self

enableCheckWorkflows()

public enableCheckWorkflows() : self
Return values
self

enableDeferredCleaning()

public enableDeferredCleaning() : self
Return values
self

enableDuplicatesIndexInvalidation()

public enableDuplicatesIndexInvalidation() : self
Return values
self

enableFieldProcession()

public enableFieldProcession() : self
Return values
self

enableSaveToHistory()

public enableSaveToHistory() : self
Return values
self

enableSaveToTimeline()

public enableSaveToTimeline() : self
Return values
self

excludeItemsFromTimelineRelationEventsRegistration()

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
$this

exportSettings()

Returns an object that describes a configuration of this Operation

public exportSettings() : Settings
Return values
Settings

getActivityProvidersToAutocomplete()

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
Context

getItem()

public getItem() : Item
Return values
Item

getItemBeforeSave()

public getItemBeforeSave() : Item|null
Return values
Item|null

getItemsThatExcludedFromTimelineRelationEventsRegistration()

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>

importSettings()

Set a new settings object that describes a configuration of this Operation

public importSettings(Settings $settings) : $this
Parameters
$settings : Settings
Return values
$this

isActivitiesAutocompletionEnabled()

public isActivitiesAutocompletionEnabled() : bool
Return values
bool

isAfterSaveActionsEnabled()

public isAfterSaveActionsEnabled() : bool
Return values
bool

isAutomationEnabled()

public isAutomationEnabled() : bool
Return values
bool

isBeforeSaveActionsEnabled()

public isBeforeSaveActionsEnabled() : bool
Return values
bool

isBizProcEnabled()

public isBizProcEnabled() : bool
Return values
bool

isCheckAccessEnabled()

public isCheckAccessEnabled() : bool
Return values
bool

isCheckFieldsEnabled()

public isCheckFieldsEnabled() : bool
Return values
bool

isCheckLimitsEnabled()

public isCheckLimitsEnabled() : bool
Return values
bool

isCheckRequiredUserFields()

public isCheckRequiredUserFields() : bool
Return values
bool

isCheckWorkflowsEnabled()

public isCheckWorkflowsEnabled() : bool
Return values
bool

isDeferredCleaningEnabled()

public isDeferredCleaningEnabled() : bool
Return values
bool

isDuplicatesIndexInvalidationEnabled()

public isDuplicatesIndexInvalidationEnabled() : bool
Return values
bool

isFieldProcessionEnabled()

public isFieldProcessionEnabled() : bool
Return values
bool

isItemChanged()

Return true if item has been changed.

public isItemChanged() : bool
Return values
bool

isSaveToHistoryEnabled()

public isSaveToHistoryEnabled() : bool
Return values
bool

isSaveToTimelineEnabled()

public isSaveToTimelineEnabled() : bool
Return values
bool

launch()

public launch() : Result
Return values
Result

processFieldsAfterSave()

public processFieldsAfterSave() : Result
Return values
Result

processFieldsBeforeSave()

We should be able to explicitly set created, updated and moved data for an item during restoration. Otherwise, we will lose real info about when an original item (before deletion) was created, etc.

public processFieldsBeforeSave() : Result

Therefore, we have this workaround.

Return values
Result

processFieldsWithPermissions()

public processFieldsWithPermissions() : Result
Return values
Result

removeAction()

public removeAction(string $actionPlacement, string $actionClassName) : self
Parameters
$actionPlacement : string
$actionClassName : string
Return values
self

setActivityProvidersToAutocomplete()

public setActivityProvidersToAutocomplete(array<string|int, string> $providersIds) : $this
Parameters
$providersIds : array<string|int, string>
Return values
$this

setContext()

Sets a new Context object to the current settings

public setContext(Context $context) : $this
Parameters
$context : Context
Return values
$this

updateItemFromUpdateEvent()

public updateItemFromUpdateEvent(Event $event) : void
Parameters
$event : Event

        
On this page

Search results