refactor(form-builder): pre-publish check reads form_field_bindings; drop binding JSON columns
This commit is contained in:
@@ -291,18 +291,13 @@ final class FormValueService
|
||||
|
||||
private function writeEntityMirror(FormSubmission $submission, FormField $field, mixed $raw): void
|
||||
{
|
||||
$binding = $field->binding;
|
||||
if (! is_array($binding) || ($binding['mode'] ?? null) === null) {
|
||||
$binding = $field->bindings()->first();
|
||||
if ($binding === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$mode = (string) $binding['mode'];
|
||||
if (! in_array($mode, ['entity_owned', 'mirrored'], true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$entity = (string) ($binding['entity'] ?? '');
|
||||
$column = (string) ($binding['column'] ?? '');
|
||||
$entity = (string) $binding->target_entity;
|
||||
$column = (string) $binding->target_attribute;
|
||||
if ($entity === '' || $column === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user