File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/lib/UI/Config/Provider/Module Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 5151 */
5252final 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 ;
You can’t perform that action at this time.
0 commit comments