Метод add

public

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

public function add(DictionaryType $type, ?string $id, string $name, ?int $sort): Result

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

Описание

Creates a value in the dictionary $type and hands it up inside {@see self::DATA_KEY_VALUE}, read back from storage rather than assembled from the input. $id absent means the identifier is generated: the value gets whichever one the boundary makes up, and a client learns it from the value handed up. $sort absent means the position the boundary gives a new value, and the same applies. An identifier the boundary refuses to store - one already taken above all - is a refusal of the boundary and not an exception: it arrives as a failed result carrying the text the boundary wrote. An exception that is not a refusal of the boundary at all - a failed query above all - is not turned into a result: it says the storage of the portal is broken rather than that the write was turned down, and it travels out as it is.

Параметры

4
Имя Тип По умолчанию Флаги
$type DictionaryType —
—
$id ?string —
—
$name string —
—
$sort ?int —
—

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

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

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/V2/Internal/Repository/Dictionary/DictionaryValueRepositoryInterface.php
Расположение метода в файле
Строки 100–100

Исходный код

PHP