Метод addAction

public

Сигнатура метода

public function addAction(AddValueRequest $request): GetResponse

Возвращает: GetResponse

Описание

The answer carries the whole new value rather than its identifier alone, and that is a declared deviation from the matrix of the standard answers. {@see \Bitrix\Rest\V3\Interaction\Response\AddResponse} publishes an `int` identifier, while a value of a dictionary is identified by a string. Of the standard shapes {@see GetResponse} is the one that fits, and returning the created entity is also what a hand-written `add` of REST v3 is told to answer; the stages of a pipeline and the two requisite groups deviate the same way for the same reason. The whole value is what the client needs here rather than a convenience: an identifier left out is generated and a position left out is defaulted, both by the domain, so the answer is the only place the client learns them from.

Параметры

1
Имя Тип По умолчанию Флаги
$request AddValueRequest —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/V2/Infrastructure/Rest/CustomController/Dictionary/DictionaryValue.php
Расположение метода в файле
Строки 156–175

Исходный код

PHP