Volume
class Volume extends Model
A volume is a collection of images. Volumes belong to one or many projects.
Traits
Constants
| IMAGE_FILE_REGEX |
Regular expression that matches the supported image file extensions. This regex allows optional HTTP query parameters after the file names, too. Example "image.jpg?raw=1". This may be required for remote images with services like Dropbox. |
| VIDEO_FILE_REGEX |
Regular expression that matches the supported video file extensions. This regex allows optional HTTP query parameters after the file names, too. Example "video.mp4?raw=1". This may be required for remote files with services like Dropbox. |
Methods
Set a dynamic JSON attribute.
Get a dynamic JSON attribute.
{@inheritdoc}
Get the attributes that should be cast.
Parses a comma separated list of filenames to an array.
Scope a query to all volumes that are accessible by a user.
The user that created the volume.
The media type of this volume.
The images belonging to this volume.
The videos belonging to this volume.
The images or videos belonging to this volume.
The images belonging to this volume ordered by filename (ascending).
Return a query for all users associated to this volume through projects.
The project(s), this volume belongs to.
The annotation sessions of this volume.
The active annotation sessions of this volume (if any).
Returns the active annotation session of this volume for the given user.
Check if the given annotation session is in conflict with existing ones.
Check if the images of this volume come from a remote URL.
An image that can be used as unique thumbnail for this volume.
URL to the thumbnail image of this volume.
Several images or videos that can be used for the preview thumbnail of a volume.
URLs to the thumbnail images of this volume.
Flush the cache that stores the volume thumbnail.
Check if the volume has some images with GPS coordinates.
Flush the cached information if this volume has images with GPS coordinates.
Set the url attribute of this volume.
Set the creating_async attribute of this volume.
Get the creating_async attribute of this volume.
Return the dynamic attribute for the export area.
Set or update the dynamic attribute for the export area.
Check if the there are tiled images in this volume.
Specifies whether the volume is an image volume.
Specifies whether the volume is a video volume.
Get the cache key for volume thumbnails.
Get the cache key for volume geo info.
Details
in
HasJsonAttributes at line 16
protected
setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')
Set a dynamic JSON attribute.
in
HasJsonAttributes at line 38
protected mixed
getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')
Get a dynamic JSON attribute.
at line 485
string
getMetadataFileDisk()
{@inheritdoc}
in
HasMetadataFile at line 20
bool
hasMetadata()
No description
in
HasMetadataFile at line 25
void
saveMetadata(UploadedFile $file)
No description
in
HasMetadataFile at line 35
VolumeMetadata|null
getMetadata()
No description
in
HasMetadataFile at line 67
void
deleteMetadata(bool $noUpdate = false)
No description
at line 54
protected array
casts()
Get the attributes that should be cast.
at line 69
static array
parseFilesQueryString(string $string)
Parses a comma separated list of filenames to an array.
at line 83
Builder
scopeAccessibleBy(Builder $query, User $user)
Scope a query to all volumes that are accessible by a user.
at line 101
User, $this>
creator()
The user that created the volume.
at line 111
MediaType, $this>
mediaType()
The media type of this volume.
at line 121
Image, $this>
images()
The images belonging to this volume.
at line 131
Video, $this>
videos()
The videos belonging to this volume.
at line 141
VolumeFile, $this>
files()
The images or videos belonging to this volume.
at line 156
VolumeFile, $this>
orderedImages()
deprecated
deprecated
The images belonging to this volume ordered by filename (ascending).
at line 166
VolumeFile, $this>
orderedFiles()
The images belonging to this volume ordered by filename (ascending).
at line 176
Builder
users()
Return a query for all users associated to this volume through projects.
at line 195
Project, $this>
projects()
The project(s), this volume belongs to.
at line 205
AnnotationSession, $this>
annotationSessions()
The annotation sessions of this volume.
at line 215
AnnotationSession, $this>
activeAnnotationSession()
The active annotation sessions of this volume (if any).
at line 235
AnnotationSession|null
getActiveAnnotationSession(User $user)
Returns the active annotation session of this volume for the given user.
An annotation session may be active for a volume but it is only also active for a user, if the user belongs to the set of restricted users of the annotation session.
at line 255
bool
hasConflictingAnnotationSession(AnnotationSession $session)
Check if the given annotation session is in conflict with existing ones.
A conflict exists if the active time period of two sessions overlaps.
at line 282
bool
isRemote()
Check if the images of this volume come from a remote URL.
at line 292
Image|null
getThumbnailAttribute()
An image that can be used as unique thumbnail for this volume.
at line 304
string|null
getThumbnailUrlAttribute()
URL to the thumbnail image of this volume.
at line 314
Collection
getThumbnailsAttribute()
Several images or videos that can be used for the preview thumbnail of a volume.
at line 352
Collection
getThumbnailsUrlAttribute()
URLs to the thumbnail images of this volume.
at line 360
flushThumbnailCache()
Flush the cache that stores the volume thumbnail.
at line 370
bool
hasGeoInfo()
Check if the volume has some images with GPS coordinates.
at line 378
flushGeoInfoCache()
Flush the cached information if this volume has images with GPS coordinates.
at line 389
setUrlAttribute(string|null $value)
Set the url attribute of this volume.
at line 404
setCreatingAsyncAttribute(bool $value)
Set the creating_async attribute of this volume.
at line 416
bool
getCreatingAsyncAttribute()
Get the creating_async attribute of this volume.
at line 426
?array
getExportAreaAttribute()
Return the dynamic attribute for the export area.
at line 434
setExportAreaAttribute(array|null $value)
Set or update the dynamic attribute for the export area.
at line 456
bool
hasTiledImages()
Check if the there are tiled images in this volume.
at line 467
bool
isImageVolume()
Specifies whether the volume is an image volume.
at line 477
bool
isVideoVolume()
Specifies whether the volume is a video volume.
at line 495
protected string
getThumbnailsCacheKey()
Get the cache key for volume thumbnails.
at line 505
protected string
getGeoInfoCacheKey()
Get the cache key for volume geo info.