Bitrix API

DeleteService uses ContextCustomer

Table of Contents

Constants

DELETE_COMPLETE  = 3
DELETE_HARD  = 2
DELETE_NONE  = 0
DELETE_SOFT  = 1
EVENT_AFTER_MESSAGE_DELETE  = 'OnAfterMessagesDelete'
MODE_AUTO  = self::DELETE_NONE
MODE_COMPLETE  = self::DELETE_COMPLETE
MODE_HARD  = self::DELETE_HARD
MODE_SOFT  = self::DELETE_SOFT
OPTION_KEY_DELETE_AFTER  = 'complete_delete_message_start_date'

Methods

__construct()  : mixed
canDelete()  : int
The method returns the available message deletion level for a specific user: 0 - none 1 - soft delete with text replacement 2 - permanent removal of the message created after installing this update 3 - complete deletion of any message
delete()  : Result
getContext()  : Context
Returns the local or global context for the action.
getFormatPullMessage()  : array<string|int, mixed>
getMessageForEvent()  : array<string|int, mixed>
setByEvent()  : self
setContext()  : self
setContextUser()  : self
setMessage()  : self
setMode()  : $this
withContext()  : static
Provides local context for the action.
withContextUser()  : static
Provides local context for the action.

Constants

EVENT_AFTER_MESSAGE_DELETE

public mixed EVENT_AFTER_MESSAGE_DELETE = 'OnAfterMessagesDelete'

MODE_COMPLETE

public mixed MODE_COMPLETE = self::DELETE_COMPLETE

OPTION_KEY_DELETE_AFTER

public mixed OPTION_KEY_DELETE_AFTER = 'complete_delete_message_start_date'

Methods

canDelete()

The method returns the available message deletion level for a specific user: 0 - none 1 - soft delete with text replacement 2 - permanent removal of the message created after installing this update 3 - complete deletion of any message

public canDelete() : int
Return values
int

getFormatPullMessage()

public getFormatPullMessage(bool $completeDelete) : array<string|int, mixed>
Parameters
$completeDelete : bool
Return values
array<string|int, mixed>

getMessageForEvent()

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

setByEvent()

public setByEvent(bool $byEvent) : self
Parameters
$byEvent : bool
Return values
self

setContextUser()

public setContextUser(mixed $user) : self
Parameters
$user : mixed
Return values
self

setMode()

public setMode(int $mode) : $this
Parameters
$mode : int

MODE_AUTO|MODE_SOFT|MODE_HARD|MODE_COMPLETE

Return values
$this

withContext()

Provides local context for the action.

public withContext(Context|null $context) : static
Parameters
$context : Context|null
Return values
static

withContextUser()

Provides local context for the action.

public withContextUser(int|User|User $user) : static
Parameters
$user : int|User|User
Return values
static

        
On this page

Search results