class LabelPolicy 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
update(User$user,Label$label)

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

bool
destroy(User$user,Label$label)

Determine if the user can remove the given label.

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 line23
bool update(User$user,Label$label)

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

Parameters

User $user
Label $label

Return Value

bool

at line45
bool destroy(User$user,Label$label)

Determine if the user can remove the given label.

Parameters

User $user
Label $label

Return Value

bool