Skip to content

Commit 099b241

Browse files
committed
IBX-10289: using content type id instead of identifier
1 parent cb6e293 commit 099b241

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/UI/Config/Provider/Module/DamWidget.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
*/
5252
final class DamWidget implements ProviderInterface
5353
{
54+
private const IMAGE_TYPE_ID = 5;
55+
5456
/** @phpstan-var TConfig */
5557
private array $config;
5658

@@ -104,7 +106,7 @@ private function getImageConfig(): array
104106
];
105107

106108
// The content type may not have the default fields; in that case, don't add the aggregations
107-
$imageType = $this->contentTypeService->loadContentTypeByIdentifier('image');
109+
$imageType = $this->contentTypeService->loadContentType(self::IMAGE_TYPE_ID);
108110
foreach ($this->config['image']['aggregations'] as $aggregation) {
109111
if ($imageType->hasFieldDefinition($aggregation['fieldDefinitionIdentifier'])) {
110112
$imageConfig['aggregations'][] = $aggregation;

0 commit comments

Comments
 (0)