$eventArgs->
getEntityManager()->
getConnection()->
executeUpdate( 'UPDATE s_media SET width = :width, height = :height WHERE id = :id',
[ ':width' =>
$width,
':height' =>
$height,
':id' =>
$media->
getId(),
] );
} $media->
setWidth($width);
$media->
setHeight($height);
} } } /**
* Test file for supported types
*/
private function isFormatSupported(Media
$media): bool
{ return $media->
getType() === Media::TYPE_IMAGE
|| ($media->
getType() === Media::TYPE_VECTOR &&
$media->
getExtension() === 'svg'
);
}