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