Skip to content

Commit 4f27bd6

Browse files
committed
add doc AssetsManagement
1 parent 06e4d58 commit 4f27bd6

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/Dtos/MediaAssetDto.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,26 @@ public static function fromModel($model)
5454
])->setModel($model);
5555
}
5656

57+
public function getFilename(): ?string
58+
{
59+
return $this->model->getFirstMedia()?->file_name;
60+
}
61+
62+
public function getMimeType(): ?string
63+
{
64+
return $this->model->getFirstMedia()?->mime_type;
65+
}
66+
67+
public function getSize(): ?int
68+
{
69+
return $this->model->getFirstMedia()?->size;
70+
}
71+
72+
public function getExtension(): ?string
73+
{
74+
return $this->model->getFirstMedia()?->extension;
75+
}
76+
5777
public function getUrl(string $conversionName = ''): ?string
5878
{
5979
$url = null;

0 commit comments

Comments
 (0)