Skip to content

Commit a0d2809

Browse files
committed
Merge branch '2026.1' into 2026.x
2 parents 012cb1c + 670d42c commit a0d2809

5 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/Metadata/Patcher/Adapter/CustomMetadataAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function patch(ElementInterface $element, array $data, UserInterface $use
9595
];
9696

9797
if (!empty($patchedMetadata)) {
98-
$element->setMetadata($patchedMetadata);
98+
$element->setMetadata($this->dataResolverService->prepareData($patchedMetadata));
9999
}
100100
}
101101

src/Metadata/Service/DataResolverServiceInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*/
2222
interface DataResolverServiceInterface
2323
{
24+
public function prepareData(array $customMetadata): array;
25+
2426
/**
2527
* @throws InvalidArgumentException
2628
*/

src/Metadata/Service/DataResolverServiceService.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ public function __construct(private DataAdapterServiceInterface $dataAdapterServ
2525
{
2626
}
2727

28+
public function prepareData(array $customMetadata): array
29+
{
30+
foreach ($customMetadata as $key => $metadata) {
31+
$customMetadata[$key]['data'] = $metadata['data'] ?? '';
32+
}
33+
34+
return $customMetadata;
35+
}
36+
2837
/**
2938
* {@inheritdoc}
3039
*/

src/Metadata/Updater/Adapter/CustomMetadataAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function update(ElementInterface $element, array $data): void
5252

5353
$this->eventDispatcher->dispatch($metadataEvent, CustomMetadataEvent::EVENT_NAME);
5454

55-
$element->setMetadata($metadataEvent->getCustomMetadata());
55+
$element->setMetadata($this->dataResolverService->prepareData($metadataEvent->getCustomMetadata()));
5656
}
5757

5858
public function getIndexKey(): string

src/Setting/Provider/ConfigSettingsProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function getSettings(): array
3232
{
3333
return [
3434
'asset_tree_paging_limit' => $this->config['assets']['tree_paging_limit'],
35+
'asset_frontend_prefix' => $this->config['assets']['frontend_prefixes']['source'] ?: null,
3536
'document_tree_paging_limit' => $this->config['documents']['tree_paging_limit'],
3637
'object_tree_paging_limit' => $this->config['objects']['tree_paging_limit'],
3738
'timezone' => $this->config['general']['timezone'] ?: date_default_timezone_get(),

0 commit comments

Comments
 (0)