BcEditSession
in package
BcEditSession
Table of Contents
Constants
- CACHE_CONFIG : mixed = '_bc_edit_session_'
- Cache config name
- CACHE_KEY_PREFIX : mixed = 'bc_edit_session_'
- Cache key prefix
- EXPIRES : mixed = 300
- Edit sessions are lightweight warnings, not hard locks.
Methods
- clear() : bool
- Clear a resource edit session.
- mark() : array<string|int, mixed>|null
- Mark a resource as being edited.
- createKey() : string
- Create cache key.
- ensureCacheConfig() : void
- Ensure edit-session cache config exists.
Constants
CACHE_CONFIG
Cache config name
public
mixed
CACHE_CONFIG
= '_bc_edit_session_'
CACHE_KEY_PREFIX
Cache key prefix
private
mixed
CACHE_KEY_PREFIX
= 'bc_edit_session_'
EXPIRES
Edit sessions are lightweight warnings, not hard locks.
private
mixed
EXPIRES
= 300
Methods
clear()
Clear a resource edit session.
public
static clear(string $type, int $id) : bool
Parameters
- $type : string
- $id : int
Return values
boolmark()
Mark a resource as being edited.
public
static mark(string $type, int $id, UserInterface|null $user) : array<string|int, mixed>|null
Parameters
- $type : string
- $id : int
- $user : UserInterface|null
Return values
array<string|int, mixed>|nullcreateKey()
Create cache key.
private
static createKey(string $type, int $id) : string
Parameters
- $type : string
- $id : int
Return values
stringensureCacheConfig()
Ensure edit-session cache config exists.
private
static ensureCacheConfig() : void