class LabelTreeVersionPolicy extendsCachedPolicy

Traits

HandlesAuthorization

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

__construct()

Create a new CachedPolicy.

mixed
remember(string$key,callable$callback)

Wrapper for the Cache::remember function of the array cache.

bool|null
before(User$user,string$ability)

Intercept all checks.

bool
create(User$user,LabelTree$tree)

Determine if the given user can create version of a label tree.

bool
access(User$user,LabelTreeVersion$version)

Determine if the given label tree version can be accessed by the user.

bool
update(User$user,LabelTreeVersion$version)

Determine if the given label tree version can be updated by the user.

bool
destroy(User$user,LabelTreeVersion$version)

Determine if the given label tree version can be deleted by the user.

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.

Parameters

string $key Key of the cached item
callable $callback Callback returning the cached item

Return Value

mixed

at line21
bool|null before(User$user,string$ability)

Intercept all checks.

Parameters

User $user
string $ability

Return Value

bool|null

at line35
bool create(User$user,LabelTree$tree)

Determine if the given user can create version of a label tree.

Parameters

User $user
LabelTree $tree

Return Value

bool

at line47
bool access(User$user,LabelTreeVersion$version)

Determine if the given label tree version can be accessed by the user.

Parameters

User $user
LabelTreeVersion $version

Return Value

bool

at line59
bool update(User$user,LabelTreeVersion$version)

Determine if the given label tree version can be updated by the user.

Parameters

User $user
LabelTreeVersion $version

Return Value

bool

at line71
bool destroy(User$user,LabelTreeVersion$version)

Determine if the given label tree version can be deleted by the user.

Parameters

User $user
LabelTreeVersion $version

Return Value

bool