Метод saveAction

public

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

public function saveAction(int $entityTypeId, string $fieldName, $isEnabled, ?int $categoryId = null): ?array

Возвращает: ?array

Описание

$isEnabled is left untyped on purpose. A form-encoded request carries a flag as a string, the engine binds the value as it came, and it calls the action through Reflection - a call the strict_types of this file does not reach - so a declared bool would coerce the "false" of a browser into true. The spellings are matched instead, {@see self::parseIsEnabled()}. $categoryId is declared though the policy is held per user field of an entity type and no action of this controller reads it: the arguments of an action are the parameters of its method, so a category left undeclared would never reach the permission gate {@see self::processBeforeAction()}.

Параметры

4
Имя Тип По умолчанию Флаги
$entityTypeId int —
—
$fieldName string —
—
$isEnabled — —
—
$categoryId ?int null
—

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

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

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/controller/aifieldfillpolicy.php
Расположение метода в файле
Строки 92–163

Исходный код

PHP