32 public function run(array $fields)
34 $checkParamsResult = $this->checkParams($fields);
35 if (!$checkParamsResult->isSuccess())
37 $this->
addErrors($checkParamsResult->getErrors());
41 $title = $fields[
'TITLE'];
42 $replaceFields = is_array($fields[
'FIELDS']) ? $fields[
'FIELDS'] : [];
44 $eventName = $fields[
'SUBMIT_EVENT_NAME'];
45 $eventName = \CUtil::JSescape($eventName);
46 $eventName = htmlspecialcharsbx($eventName);
49 'ID' => (int)$fields[
'ID'],
50 'IS_CHECKED' => $fields[
'IS_CHECKED'] ===
'Y' ?
'Y' :
'N',
51 'IS_LOADED' => $fields[
'IS_LOADED'] ===
'Y' ?
'Y' :
'N',
52 'AUTO_SAVE' => $fields[
'AUTO_SAVE'] ===
'Y' ?
'Y' :
'N',
53 'SUBMIT_EVENT_NAME' => $eventName,
55 'button_caption' => $title,
56 'fields' => $replaceFields,