| @@ 178-200 (lines=23) @@ | ||
| 175 | }, $newColumn); |
|
| 176 | $newInputs = $array_clean_merge($newInputs, $newInput); |
|
| 177 | ||
| 178 | $newAttributes = array_map(function ($v) use ($field, $availInput) { |
|
| 179 | list($k, $c) = explode('.', $v); |
|
| 180 | //Fix ResetInput Function! A Headache Implementation! |
|
| 181 | $col = explode(':', $c)[0]; |
|
| 182 | if (!array_key_exists($col, $availInput[$k])) { |
|
| 183 | return [null => null]; |
|
| 184 | } |
|
| 185 | ||
| 186 | if (is_array($availInput[$k][$col])) { |
|
| 187 | return call_user_func_array("array_merge", array_map(function ($u) use ($v, $field) { |
|
| 188 | $w = $field->label(); |
|
| 189 | //Fix ResetInput Function! A Headache Implementation! |
|
| 190 | $w .= is_array($field->column()) ? '[' . explode(':', explode('.', $v)[2])[0] . ']' : ''; |
|
| 191 | return ["{$v}:{$u}" => $w]; |
|
| 192 | }, array_keys($availInput[$k][$col]))); |
|
| 193 | } |
|
| 194 | ||
| 195 | $w = $field->label(); |
|
| 196 | //Fix ResetInput Function! A Headache Implementation! |
|
| 197 | $w .= is_array($field->column()) ? '[' . explode(':', explode('.', $v)[2])[0] . ']' : ''; |
|
| 198 | ||
| 199 | return [$v => $w]; |
|
| 200 | }, $newColumn); |
|
| 201 | $attributes = $array_clean_merge($attributes, $newAttributes); |
|
| 202 | ||
| 203 | if ($field->validationMessages) { |
|
| @@ 209-231 (lines=23) @@ | ||
| 206 | }, $newColumn); |
|
| 207 | $newInputs = $array_clean_merge($newInputs, $newInput); |
|
| 208 | ||
| 209 | $newAttributes = array_map(function ($v) use ($field, $availInput) { |
|
| 210 | list($r, $k, $c) = explode('.', $v); |
|
| 211 | //Fix ResetInput Function! A Headache Implementation! |
|
| 212 | $col = explode(':', $c)[0]; |
|
| 213 | if (!array_key_exists($col, $availInput[$k])) { |
|
| 214 | return [null => null]; |
|
| 215 | } |
|
| 216 | ||
| 217 | if (is_array($availInput[$k][$col])) { |
|
| 218 | return call_user_func_array("array_merge", array_map(function ($u) use ($v, $field) { |
|
| 219 | $w = $field->label(); |
|
| 220 | //Fix ResetInput Function! A Headache Implementation! |
|
| 221 | $w .= is_array($field->column()) ? '[' . explode(':', explode('.', $v)[2])[0] . ']' : ''; |
|
| 222 | return ["{$v}:{$u}" => $w]; |
|
| 223 | }, array_keys($availInput[$k][$col]))); |
|
| 224 | } |
|
| 225 | ||
| 226 | $w = $field->label(); |
|
| 227 | //Fix ResetInput Function! A Headache Implementation! |
|
| 228 | $w .= is_array($field->column()) ? '[' . explode(':', explode('.', $v)[2])[0] . ']' : ''; |
|
| 229 | ||
| 230 | return [$v => $w]; |
|
| 231 | }, $newColumn); |
|
| 232 | $attributes = $array_clean_merge($attributes, $newAttributes); |
|
| 233 | ||
| 234 | if ($field->validationMessages) { |
|