zu fabricjs gewechselt, noch nicht funktionsfähig
This commit is contained in:
@@ -97,11 +97,23 @@ class InviteLayoutResource extends Resource
|
||||
}
|
||||
|
||||
$layoutOptions = $data['layout_options'] ?? [];
|
||||
$formats = $layoutOptions['formats'] ?? ['pdf', 'svg'];
|
||||
$formats = $layoutOptions['formats'] ?? ['pdf', 'png'];
|
||||
if (is_string($formats)) {
|
||||
$formats = array_values(array_filter(array_map('trim', explode(',', $formats))));
|
||||
}
|
||||
$layoutOptions['formats'] = $formats ?: ['pdf', 'svg'];
|
||||
$normalizedFormats = [];
|
||||
foreach ($formats ?: ['pdf', 'png'] as $format) {
|
||||
$value = strtolower((string) $format);
|
||||
if ($value === 'svg') {
|
||||
$value = 'png';
|
||||
}
|
||||
|
||||
if (in_array($value, ['pdf', 'png'], true) && ! in_array($value, $normalizedFormats, true)) {
|
||||
$normalizedFormats[] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$layoutOptions['formats'] = $normalizedFormats ?: ['pdf', 'png'];
|
||||
|
||||
$data['layout_options'] = array_filter([
|
||||
'badge_label' => $layoutOptions['badge_label'] ?? null,
|
||||
|
||||
Reference in New Issue
Block a user