CodeExplorer generateMd5Path example
public function getName(): string
{ return 'id';
} /**
* {@inheritdoc}
*/
public function generatePathHash(MediaEntity
$media, ?MediaThumbnailEntity
$thumbnail = null
): ?string
{ return $this->
generateMd5Path($media->
getId());
}} public function getName(): string
{ return 'filename';
} /**
* {@inheritdoc}
*/
public function generatePathHash(MediaEntity
$media, ?MediaThumbnailEntity
$thumbnail = null
): ?string
{ return $this->
generateMd5Path($media->
getFileName());
}} return 'physical_filename';
} /**
* {@inheritdoc}
*/
public function generatePathHash(MediaEntity
$media, ?MediaThumbnailEntity
$thumbnail = null
): ?string
{ $timestamp =
$media->
getUploadedAt() ?
$media->
getUploadedAt()->
getTimestamp() . '/' : '';
return $this->
generateMd5Path($timestamp .
$media->
getFileName());
}}