->
where('article.id = :articleId'
) ->
andWhere('images.parentId IS NULL'
) ->
orderBy('images.position'
) ->
setParameter('articleId',
$articleId);
$result =
$builder->
getQuery()->
getArrayResult();
foreach ($result as &
$item) { if (empty($item['media'
])) { continue;
} $thumbnails =
$thumbnailManager->
getMediaThumbnails( $item['media'
]['name'
],
$item['media'
]['type'
],
$item['media'
]['extension'
],
[ [ 'width' => 140,
'height' => 140,
],
] );