Volume
class Volume extendsModel
A volume is a collection of images. Volumes belong to one or many projects.
Traits
Constants
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. |
Properties
$hidden | The attributes hidden from the model's JSON form. | ||
protectedarray | $casts | The attributes that should be casted to native types. | |
protectedarray | $appends | The accessors to append to the model's array form. |
Methods
Set a dynamic JSON attribute.
Get a dynamic JSON attribute.
Parses a comma separated list of image 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.
Sets the media type of this volume.
Sets the media type of this volume to the media type with the given ID.
The images 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 a unique thumbnail for this volume.
URL to the thumbnail image of this volume.
Several images 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 video_link attribute of this volume.
Get the video_link attribute of this volume.
Set the gis_link attribute of this volume.
Get the gis_link attribute of this volume.
Set the doi attribute of this volume.
Get the doi attribute of this volume.
Check if the there are tiled images in this volume.
Details
inHasJsonAttributesat line16
protected
setJsonAttr(string$key,mixed$value,string$attrs ='attrs')
Set a dynamic JSON attribute.
inHasJsonAttributesat line38
protectedmixed
getJsonAttr(string$key,mixed$default =null,string$attrs ='attrs')
Get a dynamic JSON attribute.
at line64
staticarray
parseImagesQueryString(string$string)
Parses a comma separated list of image filenames to an array.
at line77
Builder
scopeAccessibleBy(Builder$query,User$user)
Scope a query to all volumes that are accessible by a user.
at line97
BelongsTo
creator()
The user that created the volume.
at line107
BelongsTo
mediaType()
The media type of this volume.
at line118
void
setMediaType(MediaType$mediaType)
Sets the media type of this volume.
at line129
void
setMediaTypeId(int$id)
Sets the media type of this volume to the media type with the given ID.
at line143
HasMany
images()
The images belonging to this volume.
at line153
HasMany
orderedImages()
The images belonging to this volume ordered by filename (ascending).
at line163
Builder
users()
Return a query for all users associated to this volume through projects.
at line182
BelongsToMany
projects()
The project(s), this volume belongs to.
at line192
HasMany
annotationSessions()
The annotation sessions of this volume.
at line202
HasOne
activeAnnotationSession()
The active annotation sessions of this volume (if any).
at line222
AnnotationSession
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 line242
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 line271
bool
isRemote()
Check if the images of this volume come from a remote URL.
at line281
Image
getThumbnailAttribute()
An image that can be used a unique thumbnail for this volume.
at line293
string
getThumbnailUrlAttribute()
URL to the thumbnail image of this volume.
at line303
Collection
getThumbnailsAttribute()
Several images that can be used for the preview thumbnail of a volume.
at line327
array
getThumbnailsUrlAttribute()
URLs to the thumbnail images of this volume.
at line337
flushThumbnailCache()
Flush the cache that stores the volume thumbnail.
at line347
bool
hasGeoInfo()
Check if the volume has some images with GPS coordinates.
at line357
flushGeoInfoCache()
Flush the cached information if this volume has images with GPS coordinates.
at line370
setUrlAttribute(string$value)
Set the url attribute of this volume.
at line380
setVideoLinkAttribute(string$value)
Set the video_link attribute of this volume.
at line390
string
getVideoLinkAttribute()
Get the video_link attribute of this volume.
at line400
setGisLinkAttribute(string$value)
Set the gis_link attribute of this volume.
at line410
string
getGisLinkAttribute()
Get the gis_link attribute of this volume.
at line420
setDoiAttribute(string$value)
Set the doi attribute of this volume.
at line434
string
getDoiAttribute()
Get the doi attribute of this volume.
at line444
bool
hasTiledImages()
Check if the there are tiled images in this volume.