14 return (isset($fields[
'ID']) ===
false);
24 $fields = parent::internalizeFieldsList($arguments, $fieldsInfo);
27 'select'=>$fields[
'select'],
28 'filter'=>$fields[
'filter'],
29 'order'=>$fields[
'order'],
36 if ($name ==
'modify')
38 if(isset($arguments[
'fields']))
40 $fields = $arguments[
'fields'];
47 $arguments = parent::convertKeysToSnakeCaseArguments($name, $arguments);
57 if ($name ==
'modify')
59 $fields = $arguments[
'fields'];
65 $arguments = parent::internalizeArguments($name, $arguments);
80 return parent::externalizeFieldsGet($fields, $fieldsInfo);
91 $fields = parent::externalizeResult($name, $fields);
108 if ($name ==
'modify')
114 $r = parent::checkArguments($name, $arguments);
125 if(!$required->isSuccess())
126 $r->addError(
new Error(
'Required fields: '.implode(
' ', $required->getErrorMessages())));
141 foreach ($rewriteFields as $origName=>$rewriteField)
143 $alias = $rewriteField[
'REFERENCE_FIELD'];
155 foreach ($fields as $name=>$value)
161 $result[$origName] = $value;
165 $result[$name] = $value;
194 foreach ($fields as $name)
196 $fieldsIsAlias = isset($rewriteFields[$name]);
200 if(isset($rewriteFields[$name][
'REFERENCE_FIELD']))
202 $result[$name] = $rewriteFields[$name][
'REFERENCE_FIELD'];
220 foreach ($fields as $rawName=>$value)
222 $field = \CSqlUtil::GetFilterOperation($rawName);
224 $fieldsIsAlias = isset($rewriteFields[$field[
'FIELD']]);
228 if(isset($rewriteFields[$field[
'FIELD']][
'REFERENCE_FIELD']))
230 $originalName = $rewriteFields[$field[
'FIELD']][
'REFERENCE_FIELD'];
231 $operation = mb_substr($rawName, 0, mb_strlen($rawName) - mb_strlen($field[
'FIELD']));
232 $result[$operation.$originalName] = $value;
237 $result[$rawName] = $value;
249 foreach ($fields as $name=>$value)
251 $fieldsIsAlias = isset($rewriteFields[$name]);
255 if(isset($rewriteFields[$name][
'REFERENCE_FIELD']))
257 $result[$rewriteFields[$name][
'REFERENCE_FIELD']] = $value;
262 $result[$name] = $value;
convertKeysToSnakeCaseFields($fields)
rewriteSelectFieldsAsAliases($fields)
internalizeFieldsList($arguments, $fieldsInfo=[])
rewriteFilterFieldsAsAliases($fields)
rewriteFieldsAsOrigFields($fields)
internalizeArguments($name, $arguments)
checkFieldsModify($fields)
externalizeFieldsModify($fields)
convertKeysToSnakeCaseArguments($name, $arguments)
externalizeFieldsGet($fields, $fieldsInfo=[])
checkArguments($name, $arguments)
rewriteFieldsListAsAliases($arguments)
rewriteOrderFieldsAsAliases($fields)
externalizeResult($name, $fields)
checkRequiredFieldsModify($fields)
rewriteFieldsGetAsOrigFields($fields)
internalizeFieldsModify($fields)