Метод composesBookingForm

public static

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

public static function composesBookingForm(int $formId, array $fields): bool

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

Описание

Tells whether the form ends up holding a booking field once this input is written. Asked here because the answer is about the rows, not about the request: an attribute the input leaves unspecified keeps the value the stored row has, so a field sent without a type is of whatever type the form already holds it as. Read off the input alone, an existing booking field sent without its type would read as an ordinary one and switch the form out of booking. Only the codes whose type the input does not carry are asked about, and only when none of the specified types answers the question already: an input naming its types costs no query at all. The stored type of a code is the type of the row this write keeps - the first one of that code in the order below. A form may hold one code twice, and the write keeps the first row and removes the rest, so asking whether the form holds any booking row at all would raise the flag for a row that is about to leave.

Параметры

2
Имя Тип По умолчанию Флаги
$formId int —
—
$fields array —
—

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

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

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

Исходный код

PHP