AnnotationPolicy
class AnnotationPolicy extendsCachedPolicy
Traits
Constants
TIME |
Time to store the cached values. (is irrelevant for the array store) |
Properties
protectedCache | $cache | The cache instance to use for caching policies. | from CachedPolicy |
Methods
Wrapper for the Cache::remember function of the array cache.
Determine if the user can attach the given label to the given annotation.
Details
inCachedPolicyat line31
__construct()
Create a new CachedPolicy.
inCachedPolicyat line43
mixed
remember(string$key,callable$callback)
Wrapper for the Cache::remember function of the array cache.
at line25
bool|null
before(User$user,string$ability)
Intercept all checks.
at line39
bool
access(User$user,Annotation$annotation)
Determine if the user may access the given annotation.
at line70
bool
update(User$user,Annotation$annotation)
Determine if the user may update the given annotation.
at line103
bool
attachLabel(User$user,Annotation$annotation,Label$label)
Determine if the user can attach the given label to the given annotation.
The annototation (image) must belong to a project where the user is an editor or admin. The label must belong to a label tree that is used by one of the projects the user and the annotation belong to.
at line140
bool
destroy(User$user,Annotation$annotation)
Determine if the user may delete the given annotation.