Bitrix API

SynchronizeReservesOnUpdate extends SynchronizeReserves

Synchronize reserves on update deal.

It is processed in two stages: before and after saving, and you need to use the same instance. Example:

public function getUpdateOperation(Item $item, Context $context = null): Operation\Update
{
$operation = parent::getUpdateOperation($item, $context);

$synchronizeReserveOperation = new SynchronizeReservesOnUpdate();

$operation
->addAction(
Operation::ACTION_BEFORE_SAVE,
$synchronizeReserveOperation
)
->addAction(
Operation::ACTION_AFTER_SAVE,
$synchronizeReserveOperation
)
;

// ...
}

Table of Contents

Methods

__construct()  : mixed
process()  : Result
setContext()  : self
setItemBeforeSave()  : self

Methods

__construct()

public __construct() : mixed

setContext()

public final setContext(Context $context) : self
Parameters
$context : Context
Return values
self

setItemBeforeSave()

public final setItemBeforeSave(Item $itemBeforeSave) : self
Parameters
$itemBeforeSave : Item
Return values
self

        
On this page

Search results