Метод filterBlocksByConstantCodes
Сигнатура метода
public static function filterBlocksByConstantCodes(string|array|null $inputBlocks, array $constantCodes): array
Возвращает:
array
Описание
Builds a setup-block subset that keeps only the constants with the given codes while preserving the structural items (title/description/delimiter/... any non-Constant item) of every block that retains at least one requested constant. Blocks without any requested constant are dropped entirely, and item order inside a kept block is preserved. Used by the AI-agent upgrade fill scenario (P3.T2) to render only the NEW required constants of the reference template in the existing setup-template UI, without starting a setup workflow. Structural items are kept so the wizard shows section headers and hints, not bare fields. Parsing is delegated to validateAndParseBlocks() so the block/constant contract is not duplicated.
Параметры
2| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$inputBlocks
|
string|array|null
|
—
|
—
|
$constantCodes
|
array
|
—
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulesbizproc/install/activities/bitrix/setuptemplateactivity/setuptemplateactivity.php