52 $fieldsInfo = empty($fieldsInfo)? $this->
getFields():$fieldsInfo;
56 foreach ($fields[
'BASKET_ITEM'][
'PROPERTIES'] as $k=>$item)
59 $this->
isNewItem($item)? $listFieldsInfoAdd:$listFieldsInfoUpdate
72 if(!isset($fields[
'BASKET_ITEM'][
'ID']))
74 $emptyFields[] =
'[basketItem][id]';
76 if(!isset($fields[
'BASKET_ITEM'][
'PROPERTIES']) || !is_array($fields[
'BASKET_ITEM'][
'PROPERTIES']))
78 $emptyFields[] =
'[basketItem][properties][]';
81 if(count($emptyFields)>0)
83 $r->addError(
new Error(implode(
', ', $emptyFields)));
87 $r = parent::checkFieldsModify($fields);
100 foreach ($fields[
'BASKET_ITEM'][
'PROPERTIES'] as $k=>$item)
103 $this->
isNewItem($item)? $listFieldsInfoAdd:$listFieldsInfoUpdate
105 if(!$required->isSuccess())
107 $r->addError(
new Error(
'[properties]['.$k.
'] - '.implode(
', ', $required->getErrorMessages()).
'.'));
getListFieldInfo(array $fieldsInfo, $params=[])
internalizeFields($fields, array $fieldsInfo)
checkRequiredFields($fields, array $fieldsInfo, $params=[])
checkFieldsModify($fields)
internalizeFieldsModify($fields, $fieldsInfo=[])
checkRequiredFieldsModify($fields)