Метод save
Сигнатура метода
public function save(int $activityId, array $bindings, ?StorageFieldTransit $transit = null): array
Возвращает:
array
Описание
Stores the given set as the set of the activity and answers with what it effectively became. The order of the steps is normative, and ALG-02 names them: `dedupByOwnerKey`, `filterValid`, `trimToLimit`, `readBindings`, `deleteRows`, `insertRows`, `syncOwnerFields`, `notifyBindingsChanged`, `logBindingsCountThresholdNotice`. The incoming set is reduced to the effective one, the difference against the stored rows is computed, and only that difference is written. A write that changes nothing does exactly nothing - no query, no owner synchronization, no notification, no notice. THE OWNER THE OPERATION NAMED SURVIVES THE WRITE. The owner columns are brought in step with the effective set by the repository of the activity, and it is told what the operation said about the owner rather than only what it is bound to: an explicit owner beats the one derived from a set, and a write of the bindings is not the place that decision is reversed.
Параметры
3| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$activityId
|
int
|
—
|
—
|
$bindings
|
array
|
—
|
—
|
$transit
|
?StorageFieldTransit
|
null
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulescrm/lib/V2/Internal/Repository/Activity/ActivityBindingRepository.php