Метод saveAction
Сигнатура метода
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
~/bitrix/modulescrm/lib/controller/aifieldfillpolicy.php