20 public static function checkExistKeys(array $fields, array $keyList, $checkNull =
false)
23 if (empty($fields) || empty($keyList))
26 $checkNull = ($checkNull ===
true);
28 $fields = array_filter($fields,
'\Bitrix\Catalog\Helpers\Tools::clearNullFields');
30 foreach ($keyList as &$key)
32 if (array_key_exists($key, $fields))
51 public static function getMissingKeys(array $fields, array $keyList, $checkNull =
false)
59 $checkNull = ($checkNull ===
true);
61 $fields = array_filter($fields,
'\Bitrix\Catalog\Helpers\Tools::clearNullFields');
63 foreach ($keyList as &$key)
65 if (!array_key_exists($key, $fields))
80 public static function prepareKeys(array $fields, array $keyList, $checkNull =
false)
91 $result[
'MISSING'] = $keyList;
95 $checkNull = ($checkNull ===
true);
97 $fields = array_filter($fields,
'\Bitrix\Catalog\Helpers\Tools::clearNullFields');
99 foreach ($keyList as &$key)
101 if (!array_key_exists($key, $fields))
102 $result[
'MISSING'][] = $key;
104 $result[
'EXIST'][] = $key;